Showing preview only (4,339K chars total). Download the full file or copy to clipboard to get everything.
Repository: twitchtv/twirp
Branch: main
Commit: fb7430a3be6b
Files: 528
Total size: 4.0 MB
Directory structure:
gitextract_m5s28tuc/
├── .github/
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── commit-checks.yml
│ └── stale.yaml
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── Gopkg.toml
├── LICENSE
├── Makefile
├── NOTICE
├── PROTOCOL.md
├── README.md
├── THIRD_PARTY
├── _tools/
│ ├── .gitignore
│ └── src/
│ ├── github.com/
│ │ ├── kisielk/
│ │ │ ├── errcheck/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── internal/
│ │ │ │ │ └── errcheck/
│ │ │ │ │ └── errcheck.go
│ │ │ │ └── main.go
│ │ │ └── gotool/
│ │ │ ├── LEGAL
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── go13.go
│ │ │ ├── go14-15.go
│ │ │ ├── go16-18.go
│ │ │ ├── internal/
│ │ │ │ └── load/
│ │ │ │ ├── path.go
│ │ │ │ ├── pkg.go
│ │ │ │ └── search.go
│ │ │ ├── match.go
│ │ │ ├── match18.go
│ │ │ └── tool.go
│ │ └── twitchtv/
│ │ └── retool/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── add.go
│ │ ├── build.go
│ │ ├── clean.go
│ │ ├── do.go
│ │ ├── input.go
│ │ ├── main.go
│ │ ├── manifest.go
│ │ ├── print.go
│ │ ├── remove.go
│ │ ├── spec.go
│ │ ├── sync.go
│ │ ├── tool.go
│ │ ├── tooldir.go
│ │ ├── upgrade.go
│ │ └── vendor/
│ │ └── github.com/
│ │ ├── Masterminds/
│ │ │ └── semver/
│ │ │ ├── LICENSE.txt
│ │ │ ├── README.md
│ │ │ ├── collection.go
│ │ │ ├── constraints.go
│ │ │ ├── doc.go
│ │ │ └── version.go
│ │ └── pkg/
│ │ └── errors/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── errors.go
│ │ └── stack.go
│ ├── golang.org/
│ │ └── x/
│ │ ├── sys/
│ │ │ └── execabs/
│ │ │ └── execabs.go
│ │ └── tools/
│ │ └── go/
│ │ ├── ast/
│ │ │ └── astutil/
│ │ │ ├── enclosing.go
│ │ │ ├── imports.go
│ │ │ ├── rewrite.go
│ │ │ └── util.go
│ │ ├── buildutil/
│ │ │ ├── allpackages.go
│ │ │ ├── fakecontext.go
│ │ │ ├── overlay.go
│ │ │ ├── tags.go
│ │ │ └── util.go
│ │ ├── internal/
│ │ │ └── cgo/
│ │ │ ├── cgo.go
│ │ │ └── cgo_pkgconfig.go
│ │ └── loader/
│ │ ├── doc.go
│ │ ├── loader.go
│ │ └── util.go
│ └── google.golang.org/
│ └── protobuf/
│ ├── cmd/
│ │ └── protoc-gen-go/
│ │ ├── internal_gengo/
│ │ │ ├── init.go
│ │ │ ├── main.go
│ │ │ ├── reflect.go
│ │ │ └── well_known_types.go
│ │ └── main.go
│ ├── compiler/
│ │ └── protogen/
│ │ └── protogen.go
│ ├── encoding/
│ │ ├── prototext/
│ │ │ ├── decode.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ │ └── protowire/
│ │ └── wire.go
│ ├── internal/
│ │ ├── descfmt/
│ │ │ └── stringer.go
│ │ ├── descopts/
│ │ │ └── options.go
│ │ ├── detrand/
│ │ │ └── rand.go
│ │ ├── encoding/
│ │ │ ├── defval/
│ │ │ │ └── default.go
│ │ │ ├── messageset/
│ │ │ │ └── messageset.go
│ │ │ ├── tag/
│ │ │ │ └── tag.go
│ │ │ └── text/
│ │ │ ├── decode.go
│ │ │ ├── decode_number.go
│ │ │ ├── decode_string.go
│ │ │ ├── decode_token.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ │ ├── errors/
│ │ │ ├── errors.go
│ │ │ ├── is_go112.go
│ │ │ └── is_go113.go
│ │ ├── filedesc/
│ │ │ ├── build.go
│ │ │ ├── desc.go
│ │ │ ├── desc_init.go
│ │ │ ├── desc_lazy.go
│ │ │ ├── desc_list.go
│ │ │ ├── desc_list_gen.go
│ │ │ └── placeholder.go
│ │ ├── filetype/
│ │ │ └── build.go
│ │ ├── flags/
│ │ │ ├── flags.go
│ │ │ ├── proto_legacy_disable.go
│ │ │ └── proto_legacy_enable.go
│ │ ├── genid/
│ │ │ ├── any_gen.go
│ │ │ ├── api_gen.go
│ │ │ ├── descriptor_gen.go
│ │ │ ├── doc.go
│ │ │ ├── duration_gen.go
│ │ │ ├── empty_gen.go
│ │ │ ├── field_mask_gen.go
│ │ │ ├── goname.go
│ │ │ ├── map_entry.go
│ │ │ ├── source_context_gen.go
│ │ │ ├── struct_gen.go
│ │ │ ├── timestamp_gen.go
│ │ │ ├── type_gen.go
│ │ │ ├── wrappers.go
│ │ │ └── wrappers_gen.go
│ │ ├── impl/
│ │ │ ├── api_export.go
│ │ │ ├── checkinit.go
│ │ │ ├── codec_extension.go
│ │ │ ├── codec_field.go
│ │ │ ├── codec_gen.go
│ │ │ ├── codec_map.go
│ │ │ ├── codec_map_go111.go
│ │ │ ├── codec_map_go112.go
│ │ │ ├── codec_message.go
│ │ │ ├── codec_messageset.go
│ │ │ ├── codec_reflect.go
│ │ │ ├── codec_tables.go
│ │ │ ├── codec_unsafe.go
│ │ │ ├── convert.go
│ │ │ ├── convert_list.go
│ │ │ ├── convert_map.go
│ │ │ ├── decode.go
│ │ │ ├── encode.go
│ │ │ ├── enum.go
│ │ │ ├── extension.go
│ │ │ ├── legacy_enum.go
│ │ │ ├── legacy_export.go
│ │ │ ├── legacy_extension.go
│ │ │ ├── legacy_file.go
│ │ │ ├── legacy_message.go
│ │ │ ├── merge.go
│ │ │ ├── merge_gen.go
│ │ │ ├── message.go
│ │ │ ├── message_reflect.go
│ │ │ ├── message_reflect_field.go
│ │ │ ├── message_reflect_gen.go
│ │ │ ├── pointer_reflect.go
│ │ │ ├── pointer_unsafe.go
│ │ │ ├── validate.go
│ │ │ └── weak.go
│ │ ├── order/
│ │ │ ├── order.go
│ │ │ └── range.go
│ │ ├── pragma/
│ │ │ └── pragma.go
│ │ ├── set/
│ │ │ └── ints.go
│ │ ├── strs/
│ │ │ ├── strings.go
│ │ │ ├── strings_pure.go
│ │ │ └── strings_unsafe.go
│ │ └── version/
│ │ └── version.go
│ ├── proto/
│ │ ├── checkinit.go
│ │ ├── decode.go
│ │ ├── decode_gen.go
│ │ ├── doc.go
│ │ ├── encode.go
│ │ ├── encode_gen.go
│ │ ├── equal.go
│ │ ├── extension.go
│ │ ├── merge.go
│ │ ├── messageset.go
│ │ ├── proto.go
│ │ ├── proto_methods.go
│ │ ├── proto_reflect.go
│ │ ├── reset.go
│ │ ├── size.go
│ │ ├── size_gen.go
│ │ └── wrappers.go
│ ├── reflect/
│ │ ├── protodesc/
│ │ │ ├── desc.go
│ │ │ ├── desc_init.go
│ │ │ ├── desc_resolve.go
│ │ │ ├── desc_validate.go
│ │ │ └── proto.go
│ │ ├── protoreflect/
│ │ │ ├── methods.go
│ │ │ ├── proto.go
│ │ │ ├── source.go
│ │ │ ├── source_gen.go
│ │ │ ├── type.go
│ │ │ ├── value.go
│ │ │ ├── value_pure.go
│ │ │ ├── value_union.go
│ │ │ └── value_unsafe.go
│ │ └── protoregistry/
│ │ └── registry.go
│ ├── runtime/
│ │ ├── protoiface/
│ │ │ ├── legacy.go
│ │ │ └── methods.go
│ │ └── protoimpl/
│ │ ├── impl.go
│ │ └── version.go
│ └── types/
│ ├── descriptorpb/
│ │ └── descriptor.pb.go
│ └── pluginpb/
│ └── plugin.pb.go
├── check_protoc_version.sh
├── client_options.go
├── client_options_test.go
├── clientcompat/
│ ├── README.md
│ ├── clientcompat.go
│ ├── clientcompat.proto
│ ├── gen.go
│ ├── gocompat/
│ │ └── gocompat.go
│ ├── internal/
│ │ └── clientcompat/
│ │ ├── clientcompat.pb.go
│ │ └── clientcompat.twirp.go
│ ├── main.go
│ └── run.go
├── context.go
├── ctxsetters/
│ └── ctxsetters.go
├── docs/
│ ├── best_practices.md
│ ├── command_line.md
│ ├── curl.md
│ ├── errors.md
│ ├── example.md
│ ├── headers.md
│ ├── hooks.md
│ ├── install.md
│ ├── intro.md
│ ├── migrate_to_twirp.md
│ ├── mux.md
│ ├── protobuf_and_json.md
│ ├── routing.md
│ ├── spec_v5.md
│ ├── spec_v6.md
│ ├── spec_v7.md
│ └── version_matrix.md
├── errors.go
├── errors_test.go
├── example/
│ ├── cmd/
│ │ ├── client/
│ │ │ └── main.go
│ │ └── server/
│ │ ├── README.md
│ │ ├── main.go
│ │ └── statter.go
│ ├── gen.go
│ ├── service.pb.go
│ ├── service.proto
│ └── service.twirp.go
├── hooks/
│ └── statsd/
│ ├── statsd.go
│ └── statsd_test.go
├── interceptors.go
├── interceptors_test.go
├── internal/
│ ├── contextkeys/
│ │ └── keys.go
│ ├── descriptors/
│ │ └── descriptors.go
│ ├── gen/
│ │ ├── logging.go
│ │ ├── main.go
│ │ ├── stringutils/
│ │ │ └── stringutils.go
│ │ ├── typemap/
│ │ │ ├── testdata/
│ │ │ │ ├── fileset.pb
│ │ │ │ ├── gen.go
│ │ │ │ ├── importer.proto
│ │ │ │ ├── public_importer.proto
│ │ │ │ ├── public_reimporter.proto
│ │ │ │ ├── root_pkg.proto
│ │ │ │ └── service.proto
│ │ │ ├── typemap.go
│ │ │ └── typemap_test.go
│ │ ├── version.go
│ │ └── wrappers.go
│ └── twirptest/
│ ├── client_1_13_test.go
│ ├── client_test.go
│ ├── empty_service/
│ │ ├── compile_test.go
│ │ ├── empty_service.pb.go
│ │ ├── empty_service.proto
│ │ ├── empty_service.twirp.go
│ │ └── gen.go
│ ├── gen.go
│ ├── google_protobuf_imports/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── service.pb.go
│ │ ├── service.proto
│ │ └── service.twirp.go
│ ├── hatmakers.go
│ ├── importable/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── importable.pb.go
│ │ ├── importable.proto
│ │ └── importable.twirp.go
│ ├── importer/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── importer.pb.go
│ │ ├── importer.proto
│ │ └── importer.twirp.go
│ ├── importer_local/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── importer_local.pb.go
│ │ ├── importer_local.proto
│ │ ├── importer_local.twirp.go
│ │ ├── importer_local_msgdef.pb.go
│ │ └── importer_local_msgdef.proto
│ ├── importmapping/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── gen.sh
│ │ ├── protoc_gen-x.sh
│ │ ├── x/
│ │ │ ├── x.pb.go
│ │ │ ├── x.proto
│ │ │ └── x.twirp.go
│ │ └── y/
│ │ ├── y.pb.go
│ │ └── y.proto
│ ├── json_serialization/
│ │ ├── gen.go
│ │ ├── json_serialization.pb.go
│ │ ├── json_serialization.proto
│ │ ├── json_serialization.twirp.go
│ │ └── json_serialization_test.go
│ ├── multiple/
│ │ ├── gen.go
│ │ ├── multiple1.pb.go
│ │ ├── multiple1.proto
│ │ ├── multiple1.twirp.go
│ │ ├── multiple2.pb.go
│ │ ├── multiple2.proto
│ │ ├── multiple2.twirp.go
│ │ └── multiple_test.go
│ ├── no_package_name/
│ │ ├── gen.go
│ │ ├── no_package_name.pb.go
│ │ ├── no_package_name.proto
│ │ └── no_package_name.twirp.go
│ ├── no_package_name_importer/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── no_package_name_importer.pb.go
│ │ ├── no_package_name_importer.proto
│ │ └── no_package_name_importer.twirp.go
│ ├── service.pb.go
│ ├── service.proto
│ ├── service.twirp.go
│ ├── service_method_same_name/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── service_method_same_name.pb.go
│ │ ├── service_method_same_name.proto
│ │ └── service_method_same_name.twirp.go
│ ├── service_test.go
│ └── snake_case_names/
│ ├── compatibility_test.go
│ ├── compile_test.go
│ ├── gen.go
│ ├── snake_case_names.pb.go
│ ├── snake_case_names.proto
│ └── snake_case_names.twirp.go
├── license_test.go
├── protoc-gen-twirp/
│ ├── command_line.go
│ ├── command_line_test.go
│ ├── generator.go
│ ├── generator_test.go
│ ├── go_naming.go
│ ├── go_naming_test.go
│ └── main.go
├── server_options.go
├── server_options_test.go
├── tools.json
├── vendor/
│ ├── github.com/
│ │ ├── davecgh/
│ │ │ └── go-spew/
│ │ │ ├── LICENSE
│ │ │ └── spew/
│ │ │ ├── bypass.go
│ │ │ ├── bypasssafe.go
│ │ │ ├── common.go
│ │ │ ├── config.go
│ │ │ ├── doc.go
│ │ │ ├── dump.go
│ │ │ ├── format.go
│ │ │ └── spew.go
│ │ ├── pkg/
│ │ │ └── errors/
│ │ │ ├── LICENSE
│ │ │ ├── errors.go
│ │ │ └── stack.go
│ │ ├── pmezard/
│ │ │ └── go-difflib/
│ │ │ ├── LICENSE
│ │ │ └── difflib/
│ │ │ └── difflib.go
│ │ └── stretchr/
│ │ └── testify/
│ │ ├── LICENSE
│ │ ├── assert/
│ │ │ ├── assertion_format.go
│ │ │ ├── assertion_forward.go
│ │ │ ├── assertions.go
│ │ │ ├── doc.go
│ │ │ ├── errors.go
│ │ │ ├── forward_assertions.go
│ │ │ └── http_assertions.go
│ │ └── require/
│ │ ├── doc.go
│ │ ├── forward_requirements.go
│ │ ├── require.go
│ │ ├── require_forward.go
│ │ └── requirements.go
│ └── google.golang.org/
│ └── protobuf/
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── encoding/
│ │ ├── protojson/
│ │ │ ├── decode.go
│ │ │ ├── doc.go
│ │ │ ├── encode.go
│ │ │ └── well_known_types.go
│ │ ├── prototext/
│ │ │ ├── decode.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ │ └── protowire/
│ │ └── wire.go
│ ├── internal/
│ │ ├── descfmt/
│ │ │ └── stringer.go
│ │ ├── descopts/
│ │ │ └── options.go
│ │ ├── detrand/
│ │ │ └── rand.go
│ │ ├── encoding/
│ │ │ ├── defval/
│ │ │ │ └── default.go
│ │ │ ├── json/
│ │ │ │ ├── decode.go
│ │ │ │ ├── decode_number.go
│ │ │ │ ├── decode_string.go
│ │ │ │ ├── decode_token.go
│ │ │ │ └── encode.go
│ │ │ ├── messageset/
│ │ │ │ └── messageset.go
│ │ │ ├── tag/
│ │ │ │ └── tag.go
│ │ │ └── text/
│ │ │ ├── decode.go
│ │ │ ├── decode_number.go
│ │ │ ├── decode_string.go
│ │ │ ├── decode_token.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ │ ├── errors/
│ │ │ ├── errors.go
│ │ │ ├── is_go112.go
│ │ │ └── is_go113.go
│ │ ├── filedesc/
│ │ │ ├── build.go
│ │ │ ├── desc.go
│ │ │ ├── desc_init.go
│ │ │ ├── desc_lazy.go
│ │ │ ├── desc_list.go
│ │ │ ├── desc_list_gen.go
│ │ │ └── placeholder.go
│ │ ├── filetype/
│ │ │ └── build.go
│ │ ├── flags/
│ │ │ ├── flags.go
│ │ │ ├── proto_legacy_disable.go
│ │ │ └── proto_legacy_enable.go
│ │ ├── genid/
│ │ │ ├── any_gen.go
│ │ │ ├── api_gen.go
│ │ │ ├── descriptor_gen.go
│ │ │ ├── doc.go
│ │ │ ├── duration_gen.go
│ │ │ ├── empty_gen.go
│ │ │ ├── field_mask_gen.go
│ │ │ ├── goname.go
│ │ │ ├── map_entry.go
│ │ │ ├── source_context_gen.go
│ │ │ ├── struct_gen.go
│ │ │ ├── timestamp_gen.go
│ │ │ ├── type_gen.go
│ │ │ ├── wrappers.go
│ │ │ └── wrappers_gen.go
│ │ ├── impl/
│ │ │ ├── api_export.go
│ │ │ ├── checkinit.go
│ │ │ ├── codec_extension.go
│ │ │ ├── codec_field.go
│ │ │ ├── codec_gen.go
│ │ │ ├── codec_map.go
│ │ │ ├── codec_map_go111.go
│ │ │ ├── codec_map_go112.go
│ │ │ ├── codec_message.go
│ │ │ ├── codec_messageset.go
│ │ │ ├── codec_reflect.go
│ │ │ ├── codec_tables.go
│ │ │ ├── codec_unsafe.go
│ │ │ ├── convert.go
│ │ │ ├── convert_list.go
│ │ │ ├── convert_map.go
│ │ │ ├── decode.go
│ │ │ ├── encode.go
│ │ │ ├── enum.go
│ │ │ ├── extension.go
│ │ │ ├── legacy_enum.go
│ │ │ ├── legacy_export.go
│ │ │ ├── legacy_extension.go
│ │ │ ├── legacy_file.go
│ │ │ ├── legacy_message.go
│ │ │ ├── merge.go
│ │ │ ├── merge_gen.go
│ │ │ ├── message.go
│ │ │ ├── message_reflect.go
│ │ │ ├── message_reflect_field.go
│ │ │ ├── message_reflect_gen.go
│ │ │ ├── pointer_reflect.go
│ │ │ ├── pointer_unsafe.go
│ │ │ ├── validate.go
│ │ │ └── weak.go
│ │ ├── order/
│ │ │ ├── order.go
│ │ │ └── range.go
│ │ ├── pragma/
│ │ │ └── pragma.go
│ │ ├── set/
│ │ │ └── ints.go
│ │ ├── strs/
│ │ │ ├── strings.go
│ │ │ ├── strings_pure.go
│ │ │ └── strings_unsafe.go
│ │ └── version/
│ │ └── version.go
│ ├── proto/
│ │ ├── checkinit.go
│ │ ├── decode.go
│ │ ├── decode_gen.go
│ │ ├── doc.go
│ │ ├── encode.go
│ │ ├── encode_gen.go
│ │ ├── equal.go
│ │ ├── extension.go
│ │ ├── merge.go
│ │ ├── messageset.go
│ │ ├── proto.go
│ │ ├── proto_methods.go
│ │ ├── proto_reflect.go
│ │ ├── reset.go
│ │ ├── size.go
│ │ ├── size_gen.go
│ │ └── wrappers.go
│ ├── reflect/
│ │ ├── protoreflect/
│ │ │ ├── methods.go
│ │ │ ├── proto.go
│ │ │ ├── source.go
│ │ │ ├── source_gen.go
│ │ │ ├── type.go
│ │ │ ├── value.go
│ │ │ ├── value_pure.go
│ │ │ ├── value_union.go
│ │ │ └── value_unsafe.go
│ │ └── protoregistry/
│ │ └── registry.go
│ ├── runtime/
│ │ ├── protoiface/
│ │ │ ├── legacy.go
│ │ │ └── methods.go
│ │ └── protoimpl/
│ │ ├── impl.go
│ │ └── version.go
│ └── types/
│ ├── descriptorpb/
│ │ └── descriptor.pb.go
│ ├── known/
│ │ ├── emptypb/
│ │ │ └── empty.pb.go
│ │ └── wrapperspb/
│ │ └── wrappers.pb.go
│ └── pluginpb/
│ └── plugin.pb.go
├── vendor_test.go
├── version_constant.go
└── website/
├── .gitignore
├── core/
│ └── Footer.js
├── i18n/
│ └── en.json
├── package.json
├── pages/
│ └── en/
│ ├── help.js
│ ├── index.js
│ └── users.js
├── sidebars.json
├── siteConfig.js
└── static/
├── .well-known/
│ └── assetlinks.json
└── css/
└── custom.css
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
*Issue #, if available:*
*Description of changes:*
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
================================================
FILE: .github/workflows/commit-checks.yml
================================================
name: commit checks
on:
push:
jobs:
run:
name: tests
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['^1.16.0', '^1.15.0', '^1.14.0']
env:
GO111MODULE: 'off'
GOPATH: ${{ github.workspace }}/go
REPO_PATH: ${{ github.workspace }}/go/src/github.com/twitchtv/twirp
steps:
- uses: actions/checkout@v2
with:
# Relative path under github.workspace to place the repository
path: ./go/src/github.com/twitchtv/twirp
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Run Go Tests
run: |
cd ${{ env.REPO_PATH }}
go test -race ./...
- name: Run clientcompat Tests
run: |
cd ${{ env.REPO_PATH }}
GOBIN="${{env.REPO_PATH}}/bin" go install ./clientcompat
GOBIN="${{env.REPO_PATH}}/bin" go install ./clientcompat/gocompat
./bin/clientcompat -client ./bin/gocompat
================================================
FILE: .github/workflows/stale.yaml
================================================
name: "Stale issue handler"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # This action would run every day at midnight
jobs: # Job to close stale PRs and issues. Documentation on the github action https://github.com/marketplace/actions/close-stale-issues
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label / comment or this will be closed in 5 days'
stale-pr-message: 'This PR is stale because it has been open for 60 days with no activity. Remove stale label / comment or this will be closed in 5 days'
days-before-stale: 60
days-before-close: 5
stale-pr-label: 'no-pr-activity'
stale-issue-label: 'no-issue-activity'
exempt-pr-labels: 'pending'
exempt-issue-labels: 'pending'
================================================
FILE: .gitignore
================================================
*.test
npm-debug.log
/bin
/release
/build
================================================
FILE: .travis.yml
================================================
sudo: false
language: go
go:
- 1.13.x
- 1.14.x
- 1.15.x
- tip
script:
- go install ./...
- go test -race ./...
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
Thanks for helping make Twirp better! This is great!
## Twirp Design Principles
Contributions to Twirp should align with the project’s design principles:
- Maintain backwards compatibility. Twirp has been in production at Twitch since 2016 and released to the public in January 2018. It is currently used by many companies and individuals with a variety of needs. There must be a compelling use-case and solid reasoning behind a major version upgrade.
- Simple wire protocol and minimal public API. Fewer things in the core means fewer things to break. In addition, it ensures lower friction updates and easier to maintain implementations in other languages.
- Avoid surprising behavior. For instance, mechanisms that can alter a program’s control flow in a surprising way (such as middleware or observability hooks) should be treated with caution.
- Prefer pragmatism over bleeding-edge. Users should be able to deploy and accept updates to Twirp even if they are conservative on updating its dependencies. This includes Go, the protobuf compiler and runtime libraries, and the HTTP protocol.
- Keep configuration to a minimum. For example: avoid adding flags to code generation commands, so that generated code is predictable across versions and platforms.
- Limit dependencies where possible, so that they are easier to integrate and upgrade.
- Prefer generated code over shared libraries between services and clients, so that it is easier to implement changes without forcing a lock-step upgrade across the ecosystem.
Examples of contributions that should be addressed with high priority:
- Security updates.
- Performance improvements.
- Supporting new versions of key dependencies such as Go and Protobuf.
- Documentation.
- Making Twirp easier to integrate with other tools.
## Report an Issue
If you have run into a bug or want to discuss a new feature, please [file an issue](https://github.com/twitchtv/twirp/issues). If you'd rather not publicly discuss the issue, please email security@twitch.tv.
## Contributing Code with Pull Requests
Twirp uses github pull requests. Fork, hack away at your changes and submit. Most pull requests will go through a few iterations before they get merged. Different contributors will sometimes have different opinions, and often patches will need to be revised before they can get merged.
### Requirements
- Add tests that cover your contribution. Overall code coverage should not decrease.
- Twirp officially supports the last 3 releases of Go.
- Protobuf version 3.x.x to generate code with the protoc command.
- For linters and other tools, we use [retool](https://github.com/twitchtv/retool). If `make setup` is not able to install it, you can install it in your path with `go get github.com/twitchtv/retool` and then install tools with `retool build`.
### Running tests
Generally you want to make changes and run `make`, which will install all
dependencies we know about, build the core, and run tests. A few notes:
- Clone the repo on `$GOPATH/src/github.com/twitchtv/twirp` (go modules not supported yet).
- Run Go unit tests with `make test`.
- Most tests of the Go server are in `internal/twirptest/service_test.go`.
- Integration tests running the full stack in Go are in the [clientcompat](./clientcompat) directory.
## Contributing Documentation
Twirp's docs are generated with [Docusaurus](https://docusaurus.io/). You can safely edit anything inside the [docs](./docs) directory, adding new pages or editing them. You can edit the sidebar by editing [website/sidebars.json](./website/sidebars.json).
To render and review your changes, run docusaurus's local server. See [Install docusaurus on your machine](https://docusaurus.io/docs/en/installation.html).
1. `cd website`
2. `npm install`
3. `npm start`
4. Navigate to http://localhost:3000/twirp to see how it looks.
Publish the new docs on the `gh-pages` branch. See [this guide](https://docusaurus.io/docs/en/tutorial-publish-site) for details.
```
GIT_USER=<your-github-username> CURRENT_BRANCH=gh-pages USE_SSH=true npm run publish-gh-pages
```
## Making a New Release
Releasing versions is the responsibility of the core maintainers. Most people
can skip this section.
Twirp uses GitHub releases. To make a new release:
1. Merge all changes that should be included in the release into the main branch.
2. Update the version constant in `internal/gen/version.go`. Please respect [semantic versioning](http://semver.org/): `v<major>.<minor>.<patch>`.
3. Run `make test_all` to re-generate code and run tests. Check that generated test files include the new version in the header comment.
4. Add a new commit to main with a message like "Version vX.X.X release" and push.
5. Tag the commit you just made: `git tag vX.X.X` and `git push origin --tags`.
6. Go to GitHub https://github.com/twitchtv/twirp/releases and "Draft a new release".
7. Make sure that all new functionality is properly documented, on code comments, PR description, and include links and/or upgrade instructions on the release. For example the [v7 release](https://github.com/twitchtv/twirp/releases/tag/v7.0.0). Minor releases can just include a link to the PR/PRs that were merged included into the release.
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
## Licensing
See the [LICENSE](https://github.com/twitchtv/twirp/blob/main/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
================================================
FILE: Gopkg.toml
================================================
# The importable parts of Twirp have no external dependencies. They just use the
# standard library. But both protoc-gen-twirp and Twirp's tests *do* have some
# dependencies, and this manifest lists them.
#
# All dependencies are specified as overrides, not constraints, so that dep
# doesn't get confused if someone imports Twirp. We don't want to falsely
# require any particular versions of these libraries - they are *only* for
# tests and building main packages.
[[override]]
name = "google.golang.org/protobuf"
version = "1.26.0"
[[override]]
name = "github.com/pkg/errors"
version = "0.8.0"
[[override]]
name = "github.com/stretchr/testify"
version = "1.2.0"
[prune]
unused-packages = true
go-tests = true
non-go = true
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: Makefile
================================================
PATH := ${PWD}/_tools/bin:${PWD}/bin:${PATH}
export GO111MODULE=off
all: setup test_all
.PHONY: setup generate test_all test test_clientcompat
setup:
./check_protoc_version.sh
GOPATH="$$PWD/_tools" GOBIN="$$PWD/_tools/bin" go get github.com/twitchtv/retool
./_tools/bin/retool build
generate:
# Recompile and install generator
GOBIN="$$PWD/bin" go install -v ./protoc-gen-twirp
# Generate code from go:generate comments
go generate ./...
test_all: setup test test_clientcompat
test: generate
./_tools/bin/errcheck ./internal/twirptest
go test -race ./...
test_clientcompat: generate
GOBIN="$$PWD/bin" go install ./clientcompat
GOBIN="$$PWD/bin" go install ./clientcompat/gocompat
./bin/clientcompat -client ./bin/gocompat
================================================
FILE: NOTICE
================================================
Twirp
Copyright 2018 Twitch Interactive, Inc. All Rights Reserved.
================================================
FILE: PROTOCOL.md
================================================
# Twirp Wire Protocol
This document defines the Twirp wire protocol over HTTP. The
current protocol version is v7.
## Overview
The Twirp wire protocol is a simple RPC protocol based on HTTP and
Protocol Buffers (proto). The protocol uses HTTP URLs to specify the
RPC endpoints, and sends/receives proto messages as HTTP
request/response bodies.
To use Twirp, developers first define their APIs using proto files,
then use Twirp tools to generate the client and the server libraries.
The generated libraries implement the Twirp wire protocol, using the
standard HTTP library provided by the programming language runtime or
the operating system. Once the client and the server are implemented,
the client can communicate with the server by making RPC calls.
The Twirp wire protocol supports both binary and JSON encodings of
proto messages, and works with any HTTP client and any HTTP version.
### URLs
In [ABNF syntax](https://tools.ietf.org/html/rfc5234), Twirp's URLs
have the following format:
```abnf
URL ::= Base-URL [ Prefix ] "/" [ Package "." ] Service "/" Method
```
The Twirp wire protocol uses HTTP URLs to specify the RPC
endpoints on the server for sending the requests. Such direct mapping
makes the request routing simple and efficient. The Twirp URLs have
the following components.
* **Base-URL** is the virtual location of a Twirp API server, which is
typically published via API documentation or service discovery.
Currently, it should only contain URL `scheme` and `authority`. For
example, "https://example.com".
* **Prefix** is usually "/twirp", but it could be empty "", or an
arbitrary path like "/my/custom/prefix".
* **Package** is the proto `package` name for an API, which is often
considered as an API version. For example,
`example.calendar.v1`. This component is omitted if the API
definition doesn't have a package name.
* **Service** is the proto `service` name for an API. For example,
`CalendarService`.
* **Method** is the proto `rpc` name for an API method. For example,
`CreateEvent`.
### Requests
Twirp always uses HTTP POST method to send requests, because it
closely matches the semantics of RPC methods.
The **Request-Headers** are normal HTTP headers. The Twirp wire
protocol uses the following headers.
* **Content-Type** header indicates the proto message encoding, which
should be one of "application/protobuf", "application/json". The
server uses this value to decide how to parse the request body,
and encode the response body.
The **Request-Body** is the encoded request message, contained in the
HTTP request body. The encoding is specified by the `Content-Type`
header.
### Responses
The **Response-Headers** are just normal HTTP response headers. The
Twirp wire protocol uses the following headers.
* **Content-Type** The value should be either "application/protobuf"
or "application/json" to indicate the encoding of the response
message. It must match the "Content-Type" header in the request.
The **Request-Body** is the encoded response message contained in the
HTTP response body. The encoding is specified by the `Content-Type`
header.
### Example
The following example shows a simple Echo API definition and its
corresponding wire payloads.
The example assumes the server base URL is "https://example.com".
```proto
syntax = "proto3";
package example.echoer;
service Echo {
rpc Hello(HelloRequest) returns (HelloResponse);
}
message HelloRequest {
string message;
}
message HelloResponse {
string message;
}
```
**Proto Request**
```
POST /twirp/example.echoer.Echo/Hello HTTP/1.1
Host: example.com
Content-Type: application/protobuf
Content-Length: 15
<encoded HelloRequest>
```
**JSON Request**
```
POST /twirp/example.echoer.Echo/Hello HTTP/1.1
Host: example.com
Content-Type: application/json
Content-Length: 27
{"message":"Hello, World!"}
```
**Proto Response**
```
HTTP/1.1 200 OK
Content-Type: application/protobuf
Content-Length: 15
<encoded HelloResponse>
```
**JSON Response**
```
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 27
{"message":"Hello, World!"}
```
## Errors
Twirp error responses are always JSON-encoded, regardless of
the request's Content-Type, with a corresponding
`Content-Type: application/json` header. This ensures that
the errors are human-readable in any setting.
Twirp errors are a JSON object with the keys:
* **code**: One of the Twirp error codes as a string.
* **msg**: A human-readable message describing the error
as a string.
* **meta**: (optional) An object with string values holding
arbitrary additional metadata describing the error.
Example:
```json
{
"code": "internal",
"msg": "Something went wrong"
}
```
Example with metadata:
```json
{
"code": "permission_denied",
"msg": "Thou shall not pass",
"meta": {
"target": "Balrog",
"power": "999"
}
}
```
### Error Codes
Twirp errors always include an error code. This code is represented
as a string and must be one of a fixed set of codes, listed in the
table below. Each code has an associated HTTP Status Code. When a
server responds with the given error code, it must set the
corresponding HTTP Status Code for the response.
| Twirp Error Code | HTTP Status | Description
| ------------------- | ----------- | -----------
| canceled | 408 | The operation was cancelled.
| unknown | 500 | An unknown error occurred. For example, this can be used when handling errors raised by APIs that do not return any error information.
| invalid_argument | 400 | The client specified an invalid argument. This indicates arguments that are invalid regardless of the state of the system (i.e. a malformed file name, required argument, number out of range, etc.).
| malformed | 400 | The client sent a message which could not be decoded. This may mean that the message was encoded improperly or that the client and server have incompatible message definitions.
| deadline_exceeded | 408 | Operation expired before completion. For operations that change the state of the system, this error may be returned even if the operation has completed successfully (timeout).
| not_found | 404 | Some requested entity was not found.
| bad_route | 404 | The requested URL path wasn't routable to a Twirp service and method. This is returned by generated server code and should not be returned by application code (use "not_found" or "unimplemented" instead).
| already_exists | 409 | An attempt to create an entity failed because one already exists.
| permission_denied | 403 | The caller does not have permission to execute the specified operation. It must not be used if the caller cannot be identified (use "unauthenticated" instead).
| unauthenticated | 401 | The request does not have valid authentication credentials for the operation.
| resource_exhausted | 429 | Some resource has been exhausted or rate-limited, perhaps a per-user quota, or perhaps the entire file system is out of space.
| failed_precondition | 412 | The operation was rejected because the system is not in a state required for the operation's execution. For example, doing an rmdir operation on a directory that is non-empty, or on a non-directory object, or when having conflicting read-modify-write on the same resource.
| aborted | 409 | The operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc.
| out_of_range | 400 | The operation was attempted past the valid range. For example, seeking or reading past end of a paginated collection. Unlike "invalid_argument", this error indicates a problem that may be fixed if the system state changes (i.e. adding more items to the collection). There is a fair bit of overlap between "failed_precondition" and "out_of_range". We recommend using "out_of_range" (the more specific error) when it applies so that callers who are iterating through a space can easily look for an "out_of_range" error to detect when they are done.
| unimplemented | 501 | The operation is not implemented or not supported/enabled in this service.
| internal | 500 | When some invariants expected by the underlying system have been broken. In other words, something bad happened in the library or backend service. Twirp specific issues like wire and serialization problems are also reported as "internal" errors.
| unavailable | 503 | The service is currently unavailable. This is most likely a transient condition and may be corrected by retrying with a backoff.
| data_loss | 500 | The operation resulted in unrecoverable data loss or corruption.
================================================
FILE: README.md
================================================
 [](https://travis-ci.org/twitchtv/twirp) [](https://goreportcard.com/report/github.com/twitchtv/twirp) [](https://godoc.org/github.com/twitchtv/twirp)
---
Twirp is a framework for service-to-service communication emphasizing simplicity
and minimalism. It generates routing and serialization from API definition files
and lets you focus on your application's logic instead of thinking about
folderol like HTTP methods and paths and JSON.
Twirp is similar to [gRPC](http://www.grpc.io/), but without the custom
HTTP server and transport implementations: it runs on the standard library's
extremely-well-tested-and-high-performance `net/http` Server. It can run on HTTP
1.1, not just http/2, and supports JSON serialization for easy debugging.
Along the way, you get autogenerated clients and a simple, smart framework for
passing error messages. Nice!
Read more about the motivation behind on the [announcement blog post](https://blog.twitch.tv/en/2018/01/16/twirp-a-sweet-new-rpc-framework-for-go-5f2febbf35f/).
### Documentation
* [Getting Started](https://twitchtv.github.io/twirp/docs/intro.html)
* [Usage Example](https://twitchtv.github.io/twirp/docs/example.html)
* [Errors](https://twitchtv.github.io/twirp/docs/errors.html)
* More: https://twitchtv.github.io/twirp/
### Implementations in other languages
This repo contains the generator and runtime library for the Go implementation.
Here is a list of some third-party implementations in other languages.
| Language | Clients | Servers | Repository |
|----------------|---------|---------|------------|
| **Crystal** | ✓ | ✓ | [github.com/mloughran/twirp.cr](https://github.com/mloughran/twirp.cr)
| **Dart** | ✓ | | [github.com/apptreesoftware/protoc-gen-twirp_dart](https://github.com/apptreesoftware/protoc-gen-twirp_dart)
| **Elixir** | ✓ | ✓ | [github.com/keathley/twirp-elixir](https://github.com/keathley/twirp-elixir)
| **Java** | ✓ | ✓ | [github.com/fajran/protoc-gen-twirp_java_jaxrs](https://github.com/fajran/protoc-gen-twirp_java_jaxrs)
| **Java** | | ✓ | [github.com/devork/flit](https://github.com/devork/flit)
| **Java** | | ✓ | [github.com/github/flit](https://github.com/github/flit)
| **JavaScript** | ✓ | | [github.com/thechriswalker/protoc-gen-twirp_js](https://github.com/thechriswalker/protoc-gen-twirp_js)
| **JavaScript** | ✓ | | [github.com/Xe/twirp-codegens/cmd/protoc-gen-twirp_jsbrowser](https://github.com/Xe/twirp-codegens)
| **JavaScript** | ✓ | ✓ | [github.com/tatethurston/TwirpScript](https://github.com/tatethurston/TwirpScript)
| **Kotlin** | ✓ | | [github.com/collectiveidea/twirp-kmm](https://github.com/collectiveidea/twirp-kmm)
| **PHP** | ✓ | ✓ | [github.com/twirphp/twirp](https://github.com/twirphp/twirp)
| **Python3** | ✓ | ✓ | [github.com/verloop/twirpy](https://github.com/verloop/twirpy)
| **Ruby** | ✓ | ✓ | [github.com/twitchtv/twirp-ruby](https://github.com/twitchtv/twirp-ruby)
| **Rust** | ✓ | ✓ | [github.com/sourcefrog/prost-twirp](https://github.com/sourcefrog/prost-twirp)
| **Scala** | ✓ | ✓ | [github.com/soundcloud/twinagle](https://github.com/soundcloud/twinagle)
| **Swagger** | ✓ | ✓ | [github.com/go-bridget/twirp-swagger-gen](https://github.com/go-bridget/twirp-swagger-gen)
| **Swift** | ✓ | | [github.com/CrazyHulk/protoc-gen-swiftwirp](https://github.com/CrazyHulk/protoc-gen-swiftwirp)
| **Typescript** | ✓ | ✓ | [github.com/hopin-team/twirp-ts](https://github.com/hopin-team/twirp-ts)
| **Typescript** | ✓ | ✓ | [github.com/tatethurston/TwirpScript](https://github.com/tatethurston/TwirpScript)
| **Typescript** | ✓ | ✓ | [github.com/timostamm/protobuf-ts](https://github.com/timostamm/protobuf-ts)
### Support and Community
We have a channel on the Gophers slack, [#twirp](https://gophers.slack.com/messages/twirp),
which is the best place to get quick answers to your questions. You can join the
Gopher slack [here](https://invite.slack.golangbridge.org/).
### Releases
Twirp follows semantic versioning through git tags, and uses GitHub Releases for
release notes and upgrade guides:
[Twirp Releases](https://github.com/twitchtv/twirp/releases)
### Contributing
Check out [CONTRIBUTING.md](./CONTRIBUTING.md) for notes on making contributions.
### License
This library is licensed under the Apache 2.0 License.
================================================
FILE: THIRD_PARTY
================================================
** Protobuf -- https://github.com/protocolbuffers/protobuf-go
Copyright 2010 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: _tools/.gitignore
================================================
/bin/
/pkg/
/manifest.json
================================================
FILE: _tools/src/github.com/kisielk/errcheck/LICENSE
================================================
Copyright (c) 2013 Kamil Kisiel
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.
================================================
FILE: _tools/src/github.com/kisielk/errcheck/README.md
================================================
# errcheck
errcheck is a program for checking for unchecked errors in go programs.
[](https://travis-ci.org/kisielk/errcheck)
## Install
go get -u github.com/kisielk/errcheck
errcheck requires Go 1.6 or newer and depends on the package go/loader from the golang.org/x/tools repository.
## Use
For basic usage, just give the package path of interest as the first argument:
errcheck github.com/kisielk/errcheck/testdata
To check all packages beneath the current directory:
errcheck ./...
Or check all packages in your $GOPATH and $GOROOT:
errcheck all
errcheck also recognizes the following command-line options:
The `-tags` flag takes a space-separated list of build tags, just like `go
build`. If you are using any custom build tags in your code base, you may need
to specify the relevant tags here.
The `-asserts` flag enables checking for ignored type assertion results. It
takes no arguments.
The `-blank` flag enables checking for assignments of errors to the
blank identifier. It takes no arguments.
## Excluding functions
Use the `-exclude` flag to specify a path to a file containing a list of functions to
be excluded.
errcheck -exclude errcheck_excludes.txt path/to/package
The file should contain one function signature per line. The format for function signatures is
`package.FunctionName` while for methods it's `(package.Receiver).MethodName` for value receivers
and `(*package.Receiver).MethodName` for pointer receivers.
An example of an exclude file is:
io/ioutil.ReadFile
(*net/http.Client).Do
The exclude list is combined with an internal list for functions in the Go standard library that
have an error return type but are documented to never return an error.
### The deprecated method
The `-ignore` flag takes a comma-separated list of pairs of the form package:regex.
For each package, the regex describes which functions to ignore within that package.
The package may be omitted to have the regex apply to all packages.
For example, you may wish to ignore common operations like Read and Write:
errcheck -ignore '[rR]ead|[wW]rite' path/to/package
or you may wish to ignore common functions like the `print` variants in `fmt`:
errcheck -ignore 'fmt:[FS]?[Pp]rint*' path/to/package
The `-ignorepkg` flag takes a comma-separated list of package import paths
to ignore:
errcheck -ignorepkg 'fmt,encoding/binary' path/to/package
Note that this is equivalent to:
errcheck -ignore 'fmt:.*,encoding/binary:.*' path/to/package
If a regex is provided for a package `pkg` via `-ignore`, and `pkg` also appears
in the list of packages passed to `-ignorepkg`, the latter takes precedence;
that is, all functions within `pkg` will be ignored.
Note that by default the `fmt` package is ignored entirely, unless a regex is
specified for it. To disable this, specify a regex that matches nothing:
errcheck -ignore 'fmt:a^' path/to/package
The `-ignoretests` flag disables checking of `_test.go` files. It takes
no arguments.
## Cgo
Currently errcheck is unable to check packages that `import "C"` due to limitations
in the importer.
However, you can use errcheck on packages that depend on those which use cgo. In
order for this to work you need to `go install` the cgo dependencies before running
errcheck on the dependant packages.
See https://github.com/kisielk/errcheck/issues/16 for more details.
## Exit Codes
errcheck returns 1 if any problems were found in the checked files.
It returns 2 if there were any other failures.
# Editor Integration
## Emacs
[go-errcheck.el](https://github.com/dominikh/go-errcheck.el)
integrates errcheck with Emacs by providing a `go-errcheck` command
and customizable variables to automatically pass flags to errcheck.
## Vim
[vim-go](https://github.com/fatih/vim-go) can run errcheck via both its `:GoErrCheck`
and `:GoMetaLinter` commands.
================================================
FILE: _tools/src/github.com/kisielk/errcheck/internal/errcheck/errcheck.go
================================================
// Package errcheck is the library used to implement the errcheck command-line tool.
//
// Note: The API of this package has not been finalized and may change at any point.
package errcheck
import (
"bufio"
"errors"
"fmt"
"go/ast"
"go/build"
"go/token"
"go/types"
"os"
"regexp"
"sort"
"strings"
"sync"
"golang.org/x/tools/go/loader"
)
var errorType *types.Interface
func init() {
errorType = types.Universe.Lookup("error").Type().Underlying().(*types.Interface)
}
var (
// ErrNoGoFiles is returned when CheckPackage is run on a package with no Go source files
ErrNoGoFiles = errors.New("package contains no go source files")
)
// UncheckedError indicates the position of an unchecked error return.
type UncheckedError struct {
Pos token.Position
Line string
}
// UncheckedErrors is returned from the CheckPackage function if the package contains
// any unchecked errors.
// Errors should be appended using the Append method, which is safe to use concurrently.
type UncheckedErrors struct {
mu sync.Mutex
// Errors is a list of all the unchecked errors in the package.
// Printing an error reports its position within the file and the contents of the line.
Errors []UncheckedError
}
func (e *UncheckedErrors) Append(errors ...UncheckedError) {
e.mu.Lock()
defer e.mu.Unlock()
e.Errors = append(e.Errors, errors...)
}
func (e *UncheckedErrors) Error() string {
return fmt.Sprintf("%d unchecked errors", len(e.Errors))
}
// Len is the number of elements in the collection.
func (e *UncheckedErrors) Len() int { return len(e.Errors) }
// Swap swaps the elements with indexes i and j.
func (e *UncheckedErrors) Swap(i, j int) { e.Errors[i], e.Errors[j] = e.Errors[j], e.Errors[i] }
type byName struct{ *UncheckedErrors }
// Less reports whether the element with index i should sort before the element with index j.
func (e byName) Less(i, j int) bool {
ei, ej := e.Errors[i], e.Errors[j]
pi, pj := ei.Pos, ej.Pos
if pi.Filename != pj.Filename {
return pi.Filename < pj.Filename
}
if pi.Line != pj.Line {
return pi.Line < pj.Line
}
if pi.Column != pj.Column {
return pi.Column < pj.Column
}
return ei.Line < ej.Line
}
type Checker struct {
// ignore is a map of package names to regular expressions. Identifiers from a package are
// checked against its regular expressions and if any of the expressions match the call
// is not checked.
Ignore map[string]*regexp.Regexp
// If blank is true then assignments to the blank identifier are also considered to be
// ignored errors.
Blank bool
// If asserts is true then ignored type assertion results are also checked
Asserts bool
// build tags
Tags []string
Verbose bool
// If true, checking of of _test.go files is disabled
WithoutTests bool
exclude map[string]bool
}
func NewChecker() *Checker {
c := Checker{}
c.SetExclude(map[string]bool{})
return &c
}
func (c *Checker) SetExclude(l map[string]bool) {
// Default exclude for stdlib functions
c.exclude = map[string]bool{
"math/rand.Read": true,
"(*math/rand.Rand).Read": true,
"(*bytes.Buffer).Write": true,
"(*bytes.Buffer).WriteByte": true,
"(*bytes.Buffer).WriteRune": true,
"(*bytes.Buffer).WriteString": true,
}
for k := range l {
c.exclude[k] = true
}
}
func (c *Checker) logf(msg string, args ...interface{}) {
if c.Verbose {
fmt.Fprintf(os.Stderr, msg+"\n", args...)
}
}
func (c *Checker) load(paths ...string) (*loader.Program, error) {
ctx := build.Default
for _, tag := range c.Tags {
ctx.BuildTags = append(ctx.BuildTags, tag)
}
loadcfg := loader.Config{
Build: &ctx,
}
rest, err := loadcfg.FromArgs(paths, !c.WithoutTests)
if err != nil {
return nil, fmt.Errorf("could not parse arguments: %s", err)
}
if len(rest) > 0 {
return nil, fmt.Errorf("unhandled extra arguments: %v", rest)
}
return loadcfg.Load()
}
// CheckPackages checks packages for errors.
func (c *Checker) CheckPackages(paths ...string) error {
program, err := c.load(paths...)
if err != nil {
return fmt.Errorf("could not type check: %s", err)
}
var wg sync.WaitGroup
u := &UncheckedErrors{}
for _, pkgInfo := range program.InitialPackages() {
if pkgInfo.Pkg.Path() == "unsafe" { // not a real package
continue
}
wg.Add(1)
go func(pkgInfo *loader.PackageInfo) {
defer wg.Done()
c.logf("Checking %s", pkgInfo.Pkg.Path())
v := &visitor{
prog: program,
pkg: pkgInfo,
ignore: c.Ignore,
blank: c.Blank,
asserts: c.Asserts,
lines: make(map[string][]string),
exclude: c.exclude,
errors: []UncheckedError{},
}
for _, astFile := range v.pkg.Files {
ast.Walk(v, astFile)
}
u.Append(v.errors...)
}(pkgInfo)
}
wg.Wait()
if u.Len() > 0 {
sort.Sort(byName{u})
return u
}
return nil
}
// visitor implements the errcheck algorithm
type visitor struct {
prog *loader.Program
pkg *loader.PackageInfo
ignore map[string]*regexp.Regexp
blank bool
asserts bool
lines map[string][]string
exclude map[string]bool
errors []UncheckedError
}
func (v *visitor) excludeCall(call *ast.CallExpr) bool {
sel, ok := call.Fun.(*ast.SelectorExpr)
if !ok {
return false
}
fn, ok := v.pkg.ObjectOf(sel.Sel).(*types.Func)
if !ok {
// Shouldn't happen, but be paranoid
return false
}
// The name is fully qualified by the import path, possible type,
// function/method name and pointer receiver.
//
// TODO(dh): vendored packages will have /vendor/ in their name,
// thus not matching vendored standard library packages. If we
// want to support vendored stdlib packages, we need to implement
// FullName with our own logic.
name := fn.FullName()
return v.exclude[name]
}
func (v *visitor) ignoreCall(call *ast.CallExpr) bool {
if v.excludeCall(call) {
return true
}
// Try to get an identifier.
// Currently only supports simple expressions:
// 1. f()
// 2. x.y.f()
var id *ast.Ident
switch exp := call.Fun.(type) {
case (*ast.Ident):
id = exp
case (*ast.SelectorExpr):
id = exp.Sel
default:
// eg: *ast.SliceExpr, *ast.IndexExpr
}
if id == nil {
return false
}
// If we got an identifier for the function, see if it is ignored
if re, ok := v.ignore[""]; ok && re.MatchString(id.Name) {
return true
}
if obj := v.pkg.Uses[id]; obj != nil {
if pkg := obj.Pkg(); pkg != nil {
if re, ok := v.ignore[pkg.Path()]; ok {
return re.MatchString(id.Name)
}
// if current package being considered is vendored, check to see if it should be ignored based
// on the unvendored path.
if nonVendoredPkg, ok := nonVendoredPkgPath(pkg.Path()); ok {
if re, ok := v.ignore[nonVendoredPkg]; ok {
return re.MatchString(id.Name)
}
}
}
}
return false
}
// nonVendoredPkgPath returns the unvendored version of the provided package path (or returns the provided path if it
// does not represent a vendored path). The second return value is true if the provided package was vendored, false
// otherwise.
func nonVendoredPkgPath(pkgPath string) (string, bool) {
lastVendorIndex := strings.LastIndex(pkgPath, "/vendor/")
if lastVendorIndex == -1 {
return pkgPath, false
}
return pkgPath[lastVendorIndex+len("/vendor/"):], true
}
// errorsByArg returns a slice s such that
// len(s) == number of return types of call
// s[i] == true iff return type at position i from left is an error type
func (v *visitor) errorsByArg(call *ast.CallExpr) []bool {
switch t := v.pkg.Types[call].Type.(type) {
case *types.Named:
// Single return
return []bool{isErrorType(t)}
case *types.Pointer:
// Single return via pointer
return []bool{isErrorType(t)}
case *types.Tuple:
// Multiple returns
s := make([]bool, t.Len())
for i := 0; i < t.Len(); i++ {
switch et := t.At(i).Type().(type) {
case *types.Named:
// Single return
s[i] = isErrorType(et)
case *types.Pointer:
// Single return via pointer
s[i] = isErrorType(et)
default:
s[i] = false
}
}
return s
}
return []bool{false}
}
func (v *visitor) callReturnsError(call *ast.CallExpr) bool {
if v.isRecover(call) {
return true
}
for _, isError := range v.errorsByArg(call) {
if isError {
return true
}
}
return false
}
// isRecover returns true if the given CallExpr is a call to the built-in recover() function.
func (v *visitor) isRecover(call *ast.CallExpr) bool {
if fun, ok := call.Fun.(*ast.Ident); ok {
if _, ok := v.pkg.Uses[fun].(*types.Builtin); ok {
return fun.Name == "recover"
}
}
return false
}
func (v *visitor) addErrorAtPosition(position token.Pos) {
pos := v.prog.Fset.Position(position)
lines, ok := v.lines[pos.Filename]
if !ok {
lines = readfile(pos.Filename)
v.lines[pos.Filename] = lines
}
line := "??"
if pos.Line-1 < len(lines) {
line = strings.TrimSpace(lines[pos.Line-1])
}
v.errors = append(v.errors, UncheckedError{pos, line})
}
func readfile(filename string) []string {
var f, err = os.Open(filename)
if err != nil {
return nil
}
var lines []string
var scanner = bufio.NewScanner(f)
for scanner.Scan() {
lines = append(lines, scanner.Text())
}
return lines
}
func (v *visitor) Visit(node ast.Node) ast.Visitor {
switch stmt := node.(type) {
case *ast.ExprStmt:
if call, ok := stmt.X.(*ast.CallExpr); ok {
if !v.ignoreCall(call) && v.callReturnsError(call) {
v.addErrorAtPosition(call.Lparen)
}
}
case *ast.GoStmt:
if !v.ignoreCall(stmt.Call) && v.callReturnsError(stmt.Call) {
v.addErrorAtPosition(stmt.Call.Lparen)
}
case *ast.DeferStmt:
if !v.ignoreCall(stmt.Call) && v.callReturnsError(stmt.Call) {
v.addErrorAtPosition(stmt.Call.Lparen)
}
case *ast.AssignStmt:
if len(stmt.Rhs) == 1 {
// single value on rhs; check against lhs identifiers
if call, ok := stmt.Rhs[0].(*ast.CallExpr); ok {
if !v.blank {
break
}
if v.ignoreCall(call) {
break
}
isError := v.errorsByArg(call)
for i := 0; i < len(stmt.Lhs); i++ {
if id, ok := stmt.Lhs[i].(*ast.Ident); ok {
// We shortcut calls to recover() because errorsByArg can't
// check its return types for errors since it returns interface{}.
if id.Name == "_" && (v.isRecover(call) || isError[i]) {
v.addErrorAtPosition(id.NamePos)
}
}
}
} else if assert, ok := stmt.Rhs[0].(*ast.TypeAssertExpr); ok {
if !v.asserts {
break
}
if assert.Type == nil {
// type switch
break
}
if len(stmt.Lhs) < 2 {
// assertion result not read
v.addErrorAtPosition(stmt.Rhs[0].Pos())
} else if id, ok := stmt.Lhs[1].(*ast.Ident); ok && v.blank && id.Name == "_" {
// assertion result ignored
v.addErrorAtPosition(id.NamePos)
}
}
} else {
// multiple value on rhs; in this case a call can't return
// multiple values. Assume len(stmt.Lhs) == len(stmt.Rhs)
for i := 0; i < len(stmt.Lhs); i++ {
if id, ok := stmt.Lhs[i].(*ast.Ident); ok {
if call, ok := stmt.Rhs[i].(*ast.CallExpr); ok {
if !v.blank {
continue
}
if v.ignoreCall(call) {
continue
}
if id.Name == "_" && v.callReturnsError(call) {
v.addErrorAtPosition(id.NamePos)
}
} else if assert, ok := stmt.Rhs[i].(*ast.TypeAssertExpr); ok {
if !v.asserts {
continue
}
if assert.Type == nil {
// Shouldn't happen anyway, no multi assignment in type switches
continue
}
v.addErrorAtPosition(id.NamePos)
}
}
}
}
default:
}
return v
}
func isErrorType(t types.Type) bool {
return types.Implements(t, errorType)
}
================================================
FILE: _tools/src/github.com/kisielk/errcheck/main.go
================================================
package main
import (
"bufio"
"flag"
"fmt"
"os"
"path/filepath"
"regexp"
"runtime"
"strings"
"github.com/kisielk/errcheck/internal/errcheck"
"github.com/kisielk/gotool"
)
const (
exitCodeOk int = iota
exitUncheckedError
exitFatalError
)
var abspath bool
type ignoreFlag map[string]*regexp.Regexp
func (f ignoreFlag) String() string {
pairs := make([]string, 0, len(f))
for pkg, re := range f {
prefix := ""
if pkg != "" {
prefix = pkg + ":"
}
pairs = append(pairs, prefix+re.String())
}
return fmt.Sprintf("%q", strings.Join(pairs, ","))
}
func (f ignoreFlag) Set(s string) error {
if s == "" {
return nil
}
for _, pair := range strings.Split(s, ",") {
colonIndex := strings.Index(pair, ":")
var pkg, re string
if colonIndex == -1 {
pkg = ""
re = pair
} else {
pkg = pair[:colonIndex]
re = pair[colonIndex+1:]
}
regex, err := regexp.Compile(re)
if err != nil {
return err
}
f[pkg] = regex
}
return nil
}
type tagsFlag []string
func (f *tagsFlag) String() string {
return fmt.Sprintf("%q", strings.Join(*f, " "))
}
func (f *tagsFlag) Set(s string) error {
if s == "" {
return nil
}
tags := strings.Split(s, " ")
if tags == nil {
return nil
}
for _, tag := range tags {
if tag != "" {
*f = append(*f, tag)
}
}
return nil
}
var dotStar = regexp.MustCompile(".*")
func reportUncheckedErrors(e *errcheck.UncheckedErrors) {
wd, err := os.Getwd()
if err != nil {
wd = ""
}
for _, uncheckedError := range e.Errors {
pos := uncheckedError.Pos.String()
if !abspath {
newPos, err := filepath.Rel(wd, pos)
if err == nil {
pos = newPos
}
}
fmt.Printf("%s:\t%s\n", pos, uncheckedError.Line)
}
}
func mainCmd(args []string) int {
runtime.GOMAXPROCS(runtime.NumCPU())
checker := errcheck.NewChecker()
paths, err := parseFlags(checker, args)
if err != exitCodeOk {
return err
}
if err := checker.CheckPackages(paths...); err != nil {
if e, ok := err.(*errcheck.UncheckedErrors); ok {
reportUncheckedErrors(e)
return exitUncheckedError
} else if err == errcheck.ErrNoGoFiles {
fmt.Fprintln(os.Stderr, err)
return exitCodeOk
}
fmt.Fprintf(os.Stderr, "error: failed to check packages: %s\n", err)
return exitFatalError
}
return exitCodeOk
}
func parseFlags(checker *errcheck.Checker, args []string) ([]string, int) {
flags := flag.NewFlagSet(args[0], flag.ContinueOnError)
flags.BoolVar(&checker.Blank, "blank", false, "if true, check for errors assigned to blank identifier")
flags.BoolVar(&checker.Asserts, "asserts", false, "if true, check for ignored type assertion results")
flags.BoolVar(&checker.WithoutTests, "ignoretests", false, "if true, checking of _test.go files is disabled")
flags.BoolVar(&checker.Verbose, "verbose", false, "produce more verbose logging")
flags.BoolVar(&abspath, "abspath", false, "print absolute paths to files")
tags := tagsFlag{}
flags.Var(&tags, "tags", "space-separated list of build tags to include")
ignorePkg := flags.String("ignorepkg", "", "comma-separated list of package paths to ignore")
ignore := ignoreFlag(map[string]*regexp.Regexp{
"fmt": dotStar,
})
flags.Var(ignore, "ignore", "[deprecated] comma-separated list of pairs of the form pkg:regex\n"+
" the regex is used to ignore names within pkg.")
var excludeFile string
flags.StringVar(&excludeFile, "exclude", "", "Path to a file containing a list of functions to exclude from checking")
if err := flags.Parse(args[1:]); err != nil {
return nil, exitFatalError
}
if excludeFile != "" {
exclude := make(map[string]bool)
fh, err := os.Open(excludeFile)
if err != nil {
fmt.Fprintf(os.Stderr, "Could not read exclude file: %s\n", err)
return nil, exitFatalError
}
scanner := bufio.NewScanner(fh)
for scanner.Scan() {
exclude[scanner.Text()] = true
}
if err := scanner.Err(); err != nil {
fmt.Fprintf(os.Stderr, "Could not read exclude file: %s\n", err)
return nil, exitFatalError
}
checker.SetExclude(exclude)
}
checker.Tags = tags
for _, pkg := range strings.Split(*ignorePkg, ",") {
if pkg != "" {
ignore[pkg] = dotStar
}
}
checker.Ignore = ignore
// ImportPaths normalizes paths and expands '...'
return gotool.ImportPaths(flags.Args()), exitCodeOk
}
func main() {
os.Exit(mainCmd(os.Args))
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/LEGAL
================================================
All the files in this distribution are covered under either the MIT
license (see the file LICENSE) except some files mentioned below.
match.go, match_test.go:
Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: _tools/src/github.com/kisielk/gotool/LICENSE
================================================
Copyright (c) 2013 Kamil Kisiel <kamil@kamilkisiel.net>
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.
================================================
FILE: _tools/src/github.com/kisielk/gotool/README.md
================================================
gotool
======
[](https://godoc.org/github.com/kisielk/gotool)
[](https://travis-ci.org/kisielk/gotool)
Package gotool contains utility functions used to implement the standard "cmd/go" tool, provided as a convenience to developers who want to write tools with similar semantics.
================================================
FILE: _tools/src/github.com/kisielk/gotool/go13.go
================================================
// +build !go1.4
package gotool
import (
"go/build"
"path/filepath"
"runtime"
)
var gorootSrc = filepath.Join(runtime.GOROOT(), "src", "pkg")
func shouldIgnoreImport(p *build.Package) bool {
return true
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/go14-15.go
================================================
// +build go1.4,!go1.6
package gotool
import (
"go/build"
"path/filepath"
"runtime"
)
var gorootSrc = filepath.Join(runtime.GOROOT(), "src")
func shouldIgnoreImport(p *build.Package) bool {
return true
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/go16-18.go
================================================
// +build go1.6,!go1.9
package gotool
import (
"go/build"
"path/filepath"
"runtime"
)
var gorootSrc = filepath.Join(runtime.GOROOT(), "src")
func shouldIgnoreImport(p *build.Package) bool {
return p == nil || len(p.InvalidGoFiles) == 0
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/internal/load/path.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.9
package load
import (
"strings"
)
// hasPathPrefix reports whether the path s begins with the
// elements in prefix.
func hasPathPrefix(s, prefix string) bool {
switch {
default:
return false
case len(s) == len(prefix):
return s == prefix
case len(s) > len(prefix):
if prefix != "" && prefix[len(prefix)-1] == '/' {
return strings.HasPrefix(s, prefix)
}
return s[len(prefix)] == '/' && s[:len(prefix)] == prefix
}
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/internal/load/pkg.go
================================================
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.9
// Package load loads packages.
package load
import (
"strings"
)
// isStandardImportPath reports whether $GOROOT/src/path should be considered
// part of the standard distribution. For historical reasons we allow people to add
// their own code to $GOROOT instead of using $GOPATH, but we assume that
// code will start with a domain name (dot in the first element).
func isStandardImportPath(path string) bool {
i := strings.Index(path, "/")
if i < 0 {
i = len(path)
}
elem := path[:i]
return !strings.Contains(elem, ".")
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/internal/load/search.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.9
package load
import (
"fmt"
"go/build"
"log"
"os"
"path"
"path/filepath"
"regexp"
"strings"
)
// Context specifies values for operation of ImportPaths that would
// otherwise come from cmd/go/internal/cfg package.
//
// This is a construct added for gotool purposes and doesn't have
// an equivalent upstream in cmd/go.
type Context struct {
// BuildContext is the build context to use.
BuildContext build.Context
// GOROOTsrc is the location of the src directory in GOROOT.
// At this time, it's used only in MatchPackages to skip
// GOOROOT/src entry from BuildContext.SrcDirs output.
GOROOTsrc string
}
// allPackages returns all the packages that can be found
// under the $GOPATH directories and $GOROOT matching pattern.
// The pattern is either "all" (all packages), "std" (standard packages),
// "cmd" (standard commands), or a path including "...".
func (c *Context) allPackages(pattern string) []string {
pkgs := c.MatchPackages(pattern)
if len(pkgs) == 0 {
fmt.Fprintf(os.Stderr, "warning: %q matched no packages\n", pattern)
}
return pkgs
}
// allPackagesInFS is like allPackages but is passed a pattern
// beginning ./ or ../, meaning it should scan the tree rooted
// at the given directory. There are ... in the pattern too.
func (c *Context) allPackagesInFS(pattern string) []string {
pkgs := c.MatchPackagesInFS(pattern)
if len(pkgs) == 0 {
fmt.Fprintf(os.Stderr, "warning: %q matched no packages\n", pattern)
}
return pkgs
}
// MatchPackages returns a list of package paths matching pattern
// (see go help packages for pattern syntax).
func (c *Context) MatchPackages(pattern string) []string {
match := func(string) bool { return true }
treeCanMatch := func(string) bool { return true }
if !IsMetaPackage(pattern) {
match = matchPattern(pattern)
treeCanMatch = treeCanMatchPattern(pattern)
}
have := map[string]bool{
"builtin": true, // ignore pseudo-package that exists only for documentation
}
if !c.BuildContext.CgoEnabled {
have["runtime/cgo"] = true // ignore during walk
}
var pkgs []string
for _, src := range c.BuildContext.SrcDirs() {
if (pattern == "std" || pattern == "cmd") && src != c.GOROOTsrc {
continue
}
src = filepath.Clean(src) + string(filepath.Separator)
root := src
if pattern == "cmd" {
root += "cmd" + string(filepath.Separator)
}
filepath.Walk(root, func(path string, fi os.FileInfo, err error) error {
if err != nil || path == src {
return nil
}
want := true
// Avoid .foo, _foo, and testdata directory trees.
_, elem := filepath.Split(path)
if strings.HasPrefix(elem, ".") || strings.HasPrefix(elem, "_") || elem == "testdata" {
want = false
}
name := filepath.ToSlash(path[len(src):])
if pattern == "std" && (!isStandardImportPath(name) || name == "cmd") {
// The name "std" is only the standard library.
// If the name is cmd, it's the root of the command tree.
want = false
}
if !treeCanMatch(name) {
want = false
}
if !fi.IsDir() {
if fi.Mode()&os.ModeSymlink != 0 && want {
if target, err := os.Stat(path); err == nil && target.IsDir() {
fmt.Fprintf(os.Stderr, "warning: ignoring symlink %s\n", path)
}
}
return nil
}
if !want {
return filepath.SkipDir
}
if have[name] {
return nil
}
have[name] = true
if !match(name) {
return nil
}
pkg, err := c.BuildContext.ImportDir(path, 0)
if err != nil {
if _, noGo := err.(*build.NoGoError); noGo {
return nil
}
}
// If we are expanding "cmd", skip main
// packages under cmd/vendor. At least as of
// March, 2017, there is one there for the
// vendored pprof tool.
if pattern == "cmd" && strings.HasPrefix(pkg.ImportPath, "cmd/vendor") && pkg.Name == "main" {
return nil
}
pkgs = append(pkgs, name)
return nil
})
}
return pkgs
}
// MatchPackagesInFS returns a list of package paths matching pattern,
// which must begin with ./ or ../
// (see go help packages for pattern syntax).
func (c *Context) MatchPackagesInFS(pattern string) []string {
// Find directory to begin the scan.
// Could be smarter but this one optimization
// is enough for now, since ... is usually at the
// end of a path.
i := strings.Index(pattern, "...")
dir, _ := path.Split(pattern[:i])
// pattern begins with ./ or ../.
// path.Clean will discard the ./ but not the ../.
// We need to preserve the ./ for pattern matching
// and in the returned import paths.
prefix := ""
if strings.HasPrefix(pattern, "./") {
prefix = "./"
}
match := matchPattern(pattern)
var pkgs []string
filepath.Walk(dir, func(path string, fi os.FileInfo, err error) error {
if err != nil || !fi.IsDir() {
return nil
}
if path == dir {
// filepath.Walk starts at dir and recurses. For the recursive case,
// the path is the result of filepath.Join, which calls filepath.Clean.
// The initial case is not Cleaned, though, so we do this explicitly.
//
// This converts a path like "./io/" to "io". Without this step, running
// "cd $GOROOT/src; go list ./io/..." would incorrectly skip the io
// package, because prepending the prefix "./" to the unclean path would
// result in "././io", and match("././io") returns false.
path = filepath.Clean(path)
}
// Avoid .foo, _foo, and testdata directory trees, but do not avoid "." or "..".
_, elem := filepath.Split(path)
dot := strings.HasPrefix(elem, ".") && elem != "." && elem != ".."
if dot || strings.HasPrefix(elem, "_") || elem == "testdata" {
return filepath.SkipDir
}
name := prefix + filepath.ToSlash(path)
if !match(name) {
return nil
}
// We keep the directory if we can import it, or if we can't import it
// due to invalid Go source files. This means that directories containing
// parse errors will be built (and fail) instead of being silently skipped
// as not matching the pattern. Go 1.5 and earlier skipped, but that
// behavior means people miss serious mistakes.
// See golang.org/issue/11407.
if p, err := c.BuildContext.ImportDir(path, 0); err != nil && (p == nil || len(p.InvalidGoFiles) == 0) {
if _, noGo := err.(*build.NoGoError); !noGo {
log.Print(err)
}
return nil
}
pkgs = append(pkgs, name)
return nil
})
return pkgs
}
// treeCanMatchPattern(pattern)(name) reports whether
// name or children of name can possibly match pattern.
// Pattern is the same limited glob accepted by matchPattern.
func treeCanMatchPattern(pattern string) func(name string) bool {
wildCard := false
if i := strings.Index(pattern, "..."); i >= 0 {
wildCard = true
pattern = pattern[:i]
}
return func(name string) bool {
return len(name) <= len(pattern) && hasPathPrefix(pattern, name) ||
wildCard && strings.HasPrefix(name, pattern)
}
}
// matchPattern(pattern)(name) reports whether
// name matches pattern. Pattern is a limited glob
// pattern in which '...' means 'any string' and there
// is no other special syntax.
// Unfortunately, there are two special cases. Quoting "go help packages":
//
// First, /... at the end of the pattern can match an empty string,
// so that net/... matches both net and packages in its subdirectories, like net/http.
// Second, any slash-separted pattern element containing a wildcard never
// participates in a match of the "vendor" element in the path of a vendored
// package, so that ./... does not match packages in subdirectories of
// ./vendor or ./mycode/vendor, but ./vendor/... and ./mycode/vendor/... do.
// Note, however, that a directory named vendor that itself contains code
// is not a vendored package: cmd/vendor would be a command named vendor,
// and the pattern cmd/... matches it.
func matchPattern(pattern string) func(name string) bool {
// Convert pattern to regular expression.
// The strategy for the trailing /... is to nest it in an explicit ? expression.
// The strategy for the vendor exclusion is to change the unmatchable
// vendor strings to a disallowed code point (vendorChar) and to use
// "(anything but that codepoint)*" as the implementation of the ... wildcard.
// This is a bit complicated but the obvious alternative,
// namely a hand-written search like in most shell glob matchers,
// is too easy to make accidentally exponential.
// Using package regexp guarantees linear-time matching.
const vendorChar = "\x00"
if strings.Contains(pattern, vendorChar) {
return func(name string) bool { return false }
}
re := regexp.QuoteMeta(pattern)
re = replaceVendor(re, vendorChar)
switch {
case strings.HasSuffix(re, `/`+vendorChar+`/\.\.\.`):
re = strings.TrimSuffix(re, `/`+vendorChar+`/\.\.\.`) + `(/vendor|/` + vendorChar + `/\.\.\.)`
case re == vendorChar+`/\.\.\.`:
re = `(/vendor|/` + vendorChar + `/\.\.\.)`
case strings.HasSuffix(re, `/\.\.\.`):
re = strings.TrimSuffix(re, `/\.\.\.`) + `(/\.\.\.)?`
}
re = strings.Replace(re, `\.\.\.`, `[^`+vendorChar+`]*`, -1)
reg := regexp.MustCompile(`^` + re + `$`)
return func(name string) bool {
if strings.Contains(name, vendorChar) {
return false
}
return reg.MatchString(replaceVendor(name, vendorChar))
}
}
// replaceVendor returns the result of replacing
// non-trailing vendor path elements in x with repl.
func replaceVendor(x, repl string) string {
if !strings.Contains(x, "vendor") {
return x
}
elem := strings.Split(x, "/")
for i := 0; i < len(elem)-1; i++ {
if elem[i] == "vendor" {
elem[i] = repl
}
}
return strings.Join(elem, "/")
}
// ImportPaths returns the import paths to use for the given command line.
func (c *Context) ImportPaths(args []string) []string {
args = c.ImportPathsNoDotExpansion(args)
var out []string
for _, a := range args {
if strings.Contains(a, "...") {
if build.IsLocalImport(a) {
out = append(out, c.allPackagesInFS(a)...)
} else {
out = append(out, c.allPackages(a)...)
}
continue
}
out = append(out, a)
}
return out
}
// ImportPathsNoDotExpansion returns the import paths to use for the given
// command line, but it does no ... expansion.
func (c *Context) ImportPathsNoDotExpansion(args []string) []string {
if len(args) == 0 {
return []string{"."}
}
var out []string
for _, a := range args {
// Arguments are supposed to be import paths, but
// as a courtesy to Windows developers, rewrite \ to /
// in command-line arguments. Handles .\... and so on.
if filepath.Separator == '\\' {
a = strings.Replace(a, `\`, `/`, -1)
}
// Put argument in canonical form, but preserve leading ./.
if strings.HasPrefix(a, "./") {
a = "./" + path.Clean(a)
if a == "./." {
a = "."
}
} else {
a = path.Clean(a)
}
if IsMetaPackage(a) {
out = append(out, c.allPackages(a)...)
continue
}
out = append(out, a)
}
return out
}
// IsMetaPackage checks if name is a reserved package name that expands to multiple packages.
func IsMetaPackage(name string) bool {
return name == "std" || name == "cmd" || name == "all"
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/match.go
================================================
// Copyright (c) 2009 The Go Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// +build go1.9
package gotool
import (
"path/filepath"
"github.com/kisielk/gotool/internal/load"
)
// importPaths returns the import paths to use for the given command line.
func (c *Context) importPaths(args []string) []string {
lctx := load.Context{
BuildContext: c.BuildContext,
GOROOTsrc: c.joinPath(c.BuildContext.GOROOT, "src"),
}
return lctx.ImportPaths(args)
}
// joinPath calls c.BuildContext.JoinPath (if not nil) or else filepath.Join.
//
// It's a copy of the unexported build.Context.joinPath helper.
func (c *Context) joinPath(elem ...string) string {
if f := c.BuildContext.JoinPath; f != nil {
return f(elem...)
}
return filepath.Join(elem...)
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/match18.go
================================================
// Copyright (c) 2009 The Go Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// +build !go1.9
package gotool
import (
"fmt"
"go/build"
"log"
"os"
"path"
"path/filepath"
"regexp"
"strings"
)
// This file contains code from the Go distribution.
// matchPattern(pattern)(name) reports whether
// name matches pattern. Pattern is a limited glob
// pattern in which '...' means 'any string' and there
// is no other special syntax.
func matchPattern(pattern string) func(name string) bool {
re := regexp.QuoteMeta(pattern)
re = strings.Replace(re, `\.\.\.`, `.*`, -1)
// Special case: foo/... matches foo too.
if strings.HasSuffix(re, `/.*`) {
re = re[:len(re)-len(`/.*`)] + `(/.*)?`
}
reg := regexp.MustCompile(`^` + re + `$`)
return reg.MatchString
}
// matchPackages returns a list of package paths matching pattern
// (see go help packages for pattern syntax).
func (c *Context) matchPackages(pattern string) []string {
match := func(string) bool { return true }
treeCanMatch := func(string) bool { return true }
if !isMetaPackage(pattern) {
match = matchPattern(pattern)
treeCanMatch = treeCanMatchPattern(pattern)
}
have := map[string]bool{
"builtin": true, // ignore pseudo-package that exists only for documentation
}
if !c.BuildContext.CgoEnabled {
have["runtime/cgo"] = true // ignore during walk
}
var pkgs []string
for _, src := range c.BuildContext.SrcDirs() {
if (pattern == "std" || pattern == "cmd") && src != gorootSrc {
continue
}
src = filepath.Clean(src) + string(filepath.Separator)
root := src
if pattern == "cmd" {
root += "cmd" + string(filepath.Separator)
}
filepath.Walk(root, func(path string, fi os.FileInfo, err error) error {
if err != nil || !fi.IsDir() || path == src {
return nil
}
// Avoid .foo, _foo, and testdata directory trees.
_, elem := filepath.Split(path)
if strings.HasPrefix(elem, ".") || strings.HasPrefix(elem, "_") || elem == "testdata" {
return filepath.SkipDir
}
name := filepath.ToSlash(path[len(src):])
if pattern == "std" && (!isStandardImportPath(name) || name == "cmd") {
// The name "std" is only the standard library.
// If the name is cmd, it's the root of the command tree.
return filepath.SkipDir
}
if !treeCanMatch(name) {
return filepath.SkipDir
}
if have[name] {
return nil
}
have[name] = true
if !match(name) {
return nil
}
_, err = c.BuildContext.ImportDir(path, 0)
if err != nil {
if _, noGo := err.(*build.NoGoError); noGo {
return nil
}
}
pkgs = append(pkgs, name)
return nil
})
}
return pkgs
}
// importPathsNoDotExpansion returns the import paths to use for the given
// command line, but it does no ... expansion.
func (c *Context) importPathsNoDotExpansion(args []string) []string {
if len(args) == 0 {
return []string{"."}
}
var out []string
for _, a := range args {
// Arguments are supposed to be import paths, but
// as a courtesy to Windows developers, rewrite \ to /
// in command-line arguments. Handles .\... and so on.
if filepath.Separator == '\\' {
a = strings.Replace(a, `\`, `/`, -1)
}
// Put argument in canonical form, but preserve leading ./.
if strings.HasPrefix(a, "./") {
a = "./" + path.Clean(a)
if a == "./." {
a = "."
}
} else {
a = path.Clean(a)
}
if isMetaPackage(a) {
out = append(out, c.allPackages(a)...)
continue
}
out = append(out, a)
}
return out
}
// importPaths returns the import paths to use for the given command line.
func (c *Context) importPaths(args []string) []string {
args = c.importPathsNoDotExpansion(args)
var out []string
for _, a := range args {
if strings.Contains(a, "...") {
if build.IsLocalImport(a) {
out = append(out, c.allPackagesInFS(a)...)
} else {
out = append(out, c.allPackages(a)...)
}
continue
}
out = append(out, a)
}
return out
}
// allPackages returns all the packages that can be found
// under the $GOPATH directories and $GOROOT matching pattern.
// The pattern is either "all" (all packages), "std" (standard packages),
// "cmd" (standard commands), or a path including "...".
func (c *Context) allPackages(pattern string) []string {
pkgs := c.matchPackages(pattern)
if len(pkgs) == 0 {
fmt.Fprintf(os.Stderr, "warning: %q matched no packages\n", pattern)
}
return pkgs
}
// allPackagesInFS is like allPackages but is passed a pattern
// beginning ./ or ../, meaning it should scan the tree rooted
// at the given directory. There are ... in the pattern too.
func (c *Context) allPackagesInFS(pattern string) []string {
pkgs := c.matchPackagesInFS(pattern)
if len(pkgs) == 0 {
fmt.Fprintf(os.Stderr, "warning: %q matched no packages\n", pattern)
}
return pkgs
}
// matchPackagesInFS returns a list of package paths matching pattern,
// which must begin with ./ or ../
// (see go help packages for pattern syntax).
func (c *Context) matchPackagesInFS(pattern string) []string {
// Find directory to begin the scan.
// Could be smarter but this one optimization
// is enough for now, since ... is usually at the
// end of a path.
i := strings.Index(pattern, "...")
dir, _ := path.Split(pattern[:i])
// pattern begins with ./ or ../.
// path.Clean will discard the ./ but not the ../.
// We need to preserve the ./ for pattern matching
// and in the returned import paths.
prefix := ""
if strings.HasPrefix(pattern, "./") {
prefix = "./"
}
match := matchPattern(pattern)
var pkgs []string
filepath.Walk(dir, func(path string, fi os.FileInfo, err error) error {
if err != nil || !fi.IsDir() {
return nil
}
if path == dir {
// filepath.Walk starts at dir and recurses. For the recursive case,
// the path is the result of filepath.Join, which calls filepath.Clean.
// The initial case is not Cleaned, though, so we do this explicitly.
//
// This converts a path like "./io/" to "io". Without this step, running
// "cd $GOROOT/src; go list ./io/..." would incorrectly skip the io
// package, because prepending the prefix "./" to the unclean path would
// result in "././io", and match("././io") returns false.
path = filepath.Clean(path)
}
// Avoid .foo, _foo, and testdata directory trees, but do not avoid "." or "..".
_, elem := filepath.Split(path)
dot := strings.HasPrefix(elem, ".") && elem != "." && elem != ".."
if dot || strings.HasPrefix(elem, "_") || elem == "testdata" {
return filepath.SkipDir
}
name := prefix + filepath.ToSlash(path)
if !match(name) {
return nil
}
// We keep the directory if we can import it, or if we can't import it
// due to invalid Go source files. This means that directories containing
// parse errors will be built (and fail) instead of being silently skipped
// as not matching the pattern. Go 1.5 and earlier skipped, but that
// behavior means people miss serious mistakes.
// See golang.org/issue/11407.
if p, err := c.BuildContext.ImportDir(path, 0); err != nil && shouldIgnoreImport(p) {
if _, noGo := err.(*build.NoGoError); !noGo {
log.Print(err)
}
return nil
}
pkgs = append(pkgs, name)
return nil
})
return pkgs
}
// isMetaPackage checks if name is a reserved package name that expands to multiple packages.
func isMetaPackage(name string) bool {
return name == "std" || name == "cmd" || name == "all"
}
// isStandardImportPath reports whether $GOROOT/src/path should be considered
// part of the standard distribution. For historical reasons we allow people to add
// their own code to $GOROOT instead of using $GOPATH, but we assume that
// code will start with a domain name (dot in the first element).
func isStandardImportPath(path string) bool {
i := strings.Index(path, "/")
if i < 0 {
i = len(path)
}
elem := path[:i]
return !strings.Contains(elem, ".")
}
// hasPathPrefix reports whether the path s begins with the
// elements in prefix.
func hasPathPrefix(s, prefix string) bool {
switch {
default:
return false
case len(s) == len(prefix):
return s == prefix
case len(s) > len(prefix):
if prefix != "" && prefix[len(prefix)-1] == '/' {
return strings.HasPrefix(s, prefix)
}
return s[len(prefix)] == '/' && s[:len(prefix)] == prefix
}
}
// treeCanMatchPattern(pattern)(name) reports whether
// name or children of name can possibly match pattern.
// Pattern is the same limited glob accepted by matchPattern.
func treeCanMatchPattern(pattern string) func(name string) bool {
wildCard := false
if i := strings.Index(pattern, "..."); i >= 0 {
wildCard = true
pattern = pattern[:i]
}
return func(name string) bool {
return len(name) <= len(pattern) && hasPathPrefix(pattern, name) ||
wildCard && strings.HasPrefix(name, pattern)
}
}
================================================
FILE: _tools/src/github.com/kisielk/gotool/tool.go
================================================
// Package gotool contains utility functions used to implement the standard
// "cmd/go" tool, provided as a convenience to developers who want to write
// tools with similar semantics.
package gotool
import "go/build"
// Export functions here to make it easier to keep the implementations up to date with upstream.
// DefaultContext is the default context that uses build.Default.
var DefaultContext = Context{
BuildContext: build.Default,
}
// A Context specifies the supporting context.
type Context struct {
// BuildContext is the build.Context that is used when computing import paths.
BuildContext build.Context
}
// ImportPaths returns the import paths to use for the given command line.
//
// The path "all" is expanded to all packages in $GOPATH and $GOROOT.
// The path "std" is expanded to all packages in the Go standard library.
// The path "cmd" is expanded to all Go standard commands.
// The string "..." is treated as a wildcard within a path.
// When matching recursively, directories are ignored if they are prefixed with
// a dot or an underscore (such as ".foo" or "_foo"), or are named "testdata".
// Relative import paths are not converted to full import paths.
// If args is empty, a single element "." is returned.
func (c *Context) ImportPaths(args []string) []string {
return c.importPaths(args)
}
// ImportPaths returns the import paths to use for the given command line
// using default context.
//
// The path "all" is expanded to all packages in $GOPATH and $GOROOT.
// The path "std" is expanded to all packages in the Go standard library.
// The path "cmd" is expanded to all Go standard commands.
// The string "..." is treated as a wildcard within a path.
// When matching recursively, directories are ignored if they are prefixed with
// a dot or an underscore (such as ".foo" or "_foo"), or are named "testdata".
// Relative import paths are not converted to full import paths.
// If args is empty, a single element "." is returned.
func ImportPaths(args []string) []string {
return DefaultContext.importPaths(args)
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2017 Twitch Interactive, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: _tools/src/github.com/twitchtv/retool/README.md
================================================
# Retool: Vendor thy tools! #
[](https://travis-ci.org/twitchtv/retool)
[](https://ci.appveyor.com/project/spenczar/retool/branch/master)
## what is this ##
retool helps manage the versions of _tools_ that you use with your
repository. These are executables that are a crucial part of your
development environment, but aren't imported by any of your code, so
they don't get scooped up by glide or godep (or any other vendoring
tool).
Some examples of tools:
- [github.com/tools/godep](https://github.com/tools/godep) is a tool to
vendor Go packages.
- [github.com/golang/protobuf/protoc-gen-go](https://github.com/golang/protobuf/protoc-gen-go)
is a tool to compile Go code from protobuf definitions.
- [github.com/maxbrunsfeld/counterfeiter](https://github.com/maxbrunsfeld/counterfeiter)
is a tool to generate mocks of interfaces.
You want this if you use code generation: if everybody has a different
version of the code generator, then you'll get meaningless churn across
runs of the generator unless everyone is pinned to the right version.
You might also want this if you use linters or tools like
[github.com/kisielk/errcheck](https://github.com/kisielk/errcheck) in an
automated fashion and you want to make sure that everyone has the same
version so you can pass flags to the linter with confidence.
retool pins on a per-project basis. It works by making a complete GOPATH
within your project. You can choose to commit the source files for those
tools, if you like.
## usage ##
The expected workflow is something like this:
Install retool:
```sh
go get github.com/twitchtv/retool
```
Add a tool dependency:
```sh
retool add github.com/jteeuwen/go-bindata/go-bindata origin/master
```
Use it to generate code:
```sh
retool do go-bindata -pkg testdata -o ./testdata/testdata.go ./testdata/data.json
```
---
There are a few other commands that you'll use much less often:
Upgrade a tool to its latest version:
```sh
retool upgrade github.com/spf13/hugo origin/master
# or to a particular tag
retool upgrade github.com/spf13/hugo v0.17
```
Stop using that tool you dont like anymore:
```sh
retool remove github.com/tools/godep
```
Compile all the tools that other people have vendored in a project:
```sh
# compiles everything without using the network - useful for isolated build environments
retool build
```
Double-check that you're in sync by comparing everything with upstream versions:
```sh
# makes sure your tools match tools.json by comparing against their remotes
retool sync
```
## why would i need to manage these things ##
**TL;DR:** if you work with anyone else on your project, and they have
different versions of their tools, everything turns to shit.
One of the best parts about Go is that it is very, very simple. This
makes it straightforward to write code generation utilities. You don't
need to generate code for every project, but in large ones, code
generation can help you be much more productive.
Like, if you're writing tests that use an interface, you can use code
generation to quickly whip up structs which mock the interface so you
can force them to return errors. This way, you can test edge cases for
your interaction points with
interfaces. [github.com/maxbrunsfeld/counterfeiter](https://github.com/maxbrunsfeld/counterfeiter)
does this pretty well!
If you want to use the generated code, you should check in the
generated `.go` code to git, not just the sources, so that build boxes
and the like don't need all these code generation tools, and so that
`go get` just works cleanly.
This poses a problem, though, as soon as you start working with other
people on your project: if you have different versions of your code
generation tools, which generate slightly different output, you'll get
lots of meaningless churn in your commits. This sucks! There has to be
a better way!
## the retool way ##
retool records the versions of tools you want in a file, `tools.json`.
The file looks like this:
```json
{
"Tools": [
{
"Repository": "github.com/golang/protobuf/protoc-gen-go",
"Commit": "2fea9e168bab814ca0c6e292a6be164f624fc6ca"
}
]
}
```
Tools are identified by repo and commit. Each tool in `tools.json` will
be installed to `_tools`, which is a private GOPATH just dedicated to
keeping track of these tools.
In practice, you don't need to know much about `tools.json`. You check
it in to git so that everybody stays in sync, but you manage it with
`retool add|upgrade|remove`.
When it's time to generate code, **instead of `go generate ./...`**, you
use `retool do go generate ./...` to use your sweet, vendored tools.
This really just calls `PATH=$PWD/_tools/bin:PATH go generate ./...`; if
you want to do anything fancy, you can feel free to use that path too.
## contributing to retool ##
Any pull requests are extremely welcome! If you run into problems or
have questions, please raise a github issue!
Retool's tests are mostly integration tests. They require a working Go
compiler, a working version of git, and network access.
================================================
FILE: _tools/src/github.com/twitchtv/retool/add.go
================================================
package main
func (s spec) add(t *tool) {
if s.find(t) != -1 {
log(t.Repository + " already installed (did you mean retool upgrade?)")
return
}
s.Tools = append(s.Tools, t)
s.sync()
err := s.write()
if err != nil {
fatal("unable to add "+t.Repository, err)
}
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/build.go
================================================
package main
// builds all tools in the spec file using whatever is installed in the tool directory (_tools,
// typically). Shouldn't do any network if _tools is set up correctly.
func (s spec) build() {
err := setGoEnv()
if err != nil {
fatal("unable to set GOPATH and GOBIN env variables", err)
}
m := getManifest()
for _, t := range s.Tools {
err := install(t)
if err != nil {
fatalExec("go install "+t.Repository, err)
}
}
m.replace(s.Tools)
m.write()
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/clean.go
================================================
package main
import (
"fmt"
"go/build"
"os"
"path/filepath"
"strings"
)
type stringSet map[string]struct{}
func (ss stringSet) add(val string) { ss[val] = struct{}{} }
func (ss stringSet) has(val string) bool {
_, ok := ss[val]
return ok
}
// compute the set of dependencies for a list of packages. The packages must
// already be present in toolDirPath.
func dependencies(pkgs []string) stringSet {
deps := stringSet{}
buildCtx := build.Default
buildCtx.GOPATH = toolDirPath
var resolve func(string, []string)
resolve = func(parent string, pkgs []string) {
for _, pkg := range pkgs {
if !strings.Contains(pkg, ".") {
continue
}
p, err := buildCtx.Import(pkg, filepath.Join(toolDirPath, "src", parent), 0)
if err != nil {
fatal(fmt.Sprintf("couldn't import package %q", pkg), err)
}
if deps.has(p.ImportPath) {
continue
}
deps.add(p.ImportPath)
resolve(p.ImportPath, p.Imports)
}
}
resolve("", pkgs)
return deps
}
// Remove unused files and unused packages from toolDirPath.
func clean(pkgs []string) {
deps := dependencies(pkgs)
base := filepath.Join(toolDirPath, "src")
// Resolve any symlinks in the packages to keep, because we're going
// to walk through the file system, so we need to trim stuff by
// _filename_.
for pkgPath := range deps {
fullPath := filepath.Join(base, pkgPath)
resolved, err := filepath.EvalSymlinks(fullPath)
if err != nil {
fatal(fmt.Sprintf("couldn't eval symlinks in %q", pkgPath), err)
}
// Undo the filepath.Join from above
pkgPath, err = filepath.Rel(base, resolved)
if err != nil {
fatal(fmt.Sprintf("couldn't eval symlinks in %q", pkgPath), err)
}
deps.add(pkgPath)
}
var toDelete []string
err := filepath.Walk(base, func(path string, info os.FileInfo, err error) error {
// Bubble up errors
if err != nil {
return err
}
// Skip the root directory
if base == path {
return nil
}
// Get the package directory
pkg, err := filepath.Rel(base, path)
if err != nil {
return err
}
// Delete files in packages that aren't in packages we need to build the
// tools, and any non-go, non-legal files in packages we *do* need.
if info.Mode().IsRegular() {
pkg = filepath.Dir(pkg)
if !(deps.has(pkg) && keepFile(path)) {
toDelete = append(toDelete, path)
}
return nil
}
// If the path is a directory that's specially marked for preservation, keep
// it and all its contents.
if info.IsDir() && preserveDirectory(path) {
return filepath.SkipDir
}
// If the folder is a kept package or a parent, don't delete it and keep recursing
for p := range deps {
if strings.HasPrefix(p, pkg) {
return nil
}
}
// Otherwise this is a package that isn't imported at all. Delete it and stop recursing
toDelete = append(toDelete, path)
return filepath.SkipDir
})
if err != nil {
fatal("unable to clean _tools", err)
}
for _, path := range toDelete {
err = os.RemoveAll(path)
if err != nil {
fatal("unable to remove file or directory", err)
}
}
}
func keepFile(filename string) bool {
if strings.HasSuffix(filename, "_test.go") {
return false
}
switch filepath.Ext(filename) {
case ".go", ".s", ".c", ".h":
return true
}
if isLegalFile(filename) {
return true
}
return false
}
var commonLegalFilePrefixes = []string{
"licence", // UK spelling
"license", // US spelling
"copying",
"unlicense",
"copyright",
"copyleft",
"authors",
"contributors",
"readme", // often has a license inline
}
var commonLegalFileSubstrings = []string{
"legal",
"notice",
"disclaimer",
"patent",
"third-party",
"thirdparty",
}
func isLegalFile(filename string) bool {
base := strings.ToLower(filepath.Base(filename))
for _, p := range commonLegalFilePrefixes {
if strings.HasPrefix(base, p) {
return true
}
}
for _, s := range commonLegalFileSubstrings {
if strings.Contains(base, s) {
return true
}
}
return false
}
// List of directories that should be completely preserved if they are present.
var preservedDirectories = []string{
// gometalinter vendors its own linters and relies on this directory's
// existence. See issue #7.
filepath.Join("github.com", "alecthomas", "gometalinter", "_linters"),
// sqlboiler requires template files to exist at runtime. See pull request #25.
filepath.Join("github.com", "vattle", "sqlboiler", "templates"),
filepath.Join("github.com", "vattle", "sqlboiler", "templates_test"),
filepath.Join("github.com", "volatiletech", "sqlboiler", "templates"),
filepath.Join("github.com", "volatiletech", "sqlboiler", "templates_test"),
}
// checks whether path is in the list of preserved directories.
func preserveDirectory(path string) bool {
for _, d := range preservedDirectories {
if strings.HasSuffix(path, d) {
return true
}
}
return false
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/do.go
================================================
package main
import (
"os"
"os/exec"
"path/filepath"
"strings"
)
func setPath() error {
prevpath := os.Getenv("PATH")
newPath := filepath.Join(toolDirPath, "bin") + string(os.PathListSeparator) + prevpath
return os.Setenv("PATH", newPath)
}
// setGoEnv sets GOBIN and GOPATH to point to _tools/bin and $GOPATH:_tools,
// respectively. This is done for github.com/alecthomas/gometalinter
// compatibility: gometalinter vendors its own linters, and checks for their
// existence by checking in each GOPATH entry for
// src/github.com/alecthomas/gometalinter/_linters.
//
// GOBIN is set so gometalinter will use it to decide where to put its vendored
// linters with the gometalinter --install command, and so that it prefers the
// binaries built in _tools/bin when executing linters.
func setGoEnv() error {
newGoBin := filepath.Join(toolDirPath, "bin")
if err := os.Setenv("GOBIN", newGoBin); err != nil {
return err
}
prevGoPath := os.Getenv("GOPATH")
newGoPath := prevGoPath + string(os.PathListSeparator) + toolDirPath
return os.Setenv("GOPATH", newGoPath)
}
func do() {
args := positionalArgs
if len(args) == 0 {
fatal("no command passed to retool do", nil)
}
if err := setPath(); err != nil {
fatal("unable to set PATH", err)
}
if err := setGoEnv(); err != nil {
fatal("unable to set up go environment variables", err)
}
cmd := exec.Command(args[0], args[1:]...)
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
err := cmd.Run()
if err != nil {
msg := "failed on '" + strings.Join(args, " ") + "'"
fatal(msg, err)
}
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/input.go
================================================
package main
import (
"flag"
"fmt"
"os"
)
var (
verboseFlag = flag.Bool("verbose", false, "Enable more detailed output that may be helpful for troubleshooting.")
forkFlag = flag.String("f", "", "Use a fork of the repository rather than the default upstream")
// TODO: Refactor so that this global state is not necessary.
positionalArgs []string
)
func verbosef(format string, a ...interface{}) {
if *verboseFlag {
_, _ = fmt.Fprintf(os.Stderr, format, a...)
}
}
func parseArgs() (command string, t *tool) {
if !flag.Parsed() {
panic("parseArgs expects that flags have already been parsed")
}
args := flag.Args()
if len(args) < 1 {
printUsageAndExit("", 1)
}
command = args[0]
args = args[1:]
t = new(tool)
positionalArgs = args
switch command {
case "version":
assertArgLength(args, command, 0)
return "version", t
case "sync":
assertArgLength(args, command, 0)
return "sync", t
case "add":
assertArgLength(args, command, 2)
t.Repository = args[0]
t.ref = args[1]
t.Fork = *forkFlag
return "add", t
case "upgrade":
assertArgLength(args, command, 2)
t.Repository = args[0]
t.ref = args[1]
t.Fork = *forkFlag
return "upgrade", t
case "remove":
assertArgLength(args, command, 1)
t.Repository = args[0]
return "remove", t
case "do":
// A variable number of arguments are permissible for the 'do' subcommand; they are passed via t.PositionalArgs.
return "do", t
case "clean":
assertArgLength(args, command, 0)
return "clean", t
case "build":
assertArgLength(args, command, 0)
return "build", t
case "help":
assertArgLength(args, command, 1)
printUsageAndExit(args[0], 0)
default:
printUsageAndExit("", 1)
}
return "", t
}
func assertArgLength(args []string, command string, arglength int) {
if len(args) != arglength {
printUsageAndExit(command, 1)
}
}
func printUsageAndExit(command string, exitCode int) {
switch command {
case "add":
fmt.Println(addUsage)
case "remove":
fmt.Println(removeUsage)
case "upgrade":
fmt.Println(upgradeUsage)
case "sync":
fmt.Println(syncUsage)
case "do":
fmt.Println(doUsage)
case "clean":
fmt.Println(cleanUsage)
case "build":
fmt.Println(buildUsage)
default:
fmt.Println(usage)
}
os.Exit(exitCode)
}
const usage = `usage: retool (add | remove | upgrade | sync | do | build | help)
use retool with a subcommand:
add will add a tool
remove will remove a tool
upgrade will upgrade a tool
sync will synchronize your _tools with tools.json, downloading if necessary
build will compile all the tools in _tools
do will run stuff using your installed tools
help [command] will describe a command in more detail
version will print the installed version of retool
`
const addUsage = `usage: retool add [repository] [commit]
eg: retool add github.com/tools/godep 3020345802e4bff23902cfc1d19e90a79fae714e
Add will mark a repository as a tool you want to use. It will rewrite
tools.json to record this fact. It will then fetch the repository,
reset it to the desired commit, and install it to _tools/bin.
You can also use a symbolic reference, like 'master' or
'origin/master' or 'origin/v1.0'. Retool will end up parsing this and
storing the underlying SHA.
`
const upgradeUsage = `usage: retool upgrade [repository] [commit]
eg: retool upgrade github.com/tools/godep 3020345802e4bff23902cfc1d19e90a79fae714e
Upgrade set the commit SHA of a tool you want to use. It will
rewrite tools.json to record this fact. It will then fetch the
repository, reset it to the desired commit, and install it to
_tools/bin.
You can also use a symbolic reference, like 'master' or
'origin/master' or 'origin/v1.0'. Retool will end up parsing this and
storing the underlying SHA.
`
const removeUsage = `usage: retool remove [repository]
eg: retool remove github.com/tools/godep
Remove will remove a tool from your tools.json. It won't delete the
underlying repo from _tools, because it might be a dependency of some
other tool. If you want to clean things up, retool sync will clear out
unused dependencies.
`
const syncUsage = `usage: retool sync
Sync will synchronize your _tools directory to match tools.json. It will do this by making network
calls to download tools and set them to the right versions.
If you want to just install whatever is in _tools/src without using network, see 'retool build'.
`
const doUsage = `usage: retool do [command and args]
retool do will make sure your _tools directory is synced, and then
execute a command with the tools installed in _tools.
This is just
retool sync && PATH=$PWD/_tools/bin:$PATH [command and args]
That works too.
`
const cleanUsage = `usage: retool clean
retool clean has no effect, but still exists for compatibility.
`
const buildUsage = `usage: retool build
retool build will compile all the tools listed in tools.json, obeying whatever is currently
downloaded into _tools. It will not do additional network calls. This is typically useful for
compiling vendored tools so you can use them inside isolated environments.
retool sync is the more full-featured version of retool build. It will actually do git fetches to
make sure the right stuff gets installed, but this requires network access.
`
================================================
FILE: _tools/src/github.com/twitchtv/retool/main.go
================================================
package main
import (
"flag"
"fmt"
"os"
"github.com/Masterminds/semver"
)
var version = semver.MustParse("v1.3.5")
func main() {
flag.Parse()
if err := ensureTooldir(); err != nil {
fatal("failed to locate or create tool directory", err)
}
cmd, tool := parseArgs()
if cmd == "version" {
fmt.Fprintf(os.Stdout, "retool %s", version)
os.Exit(0)
}
if !specExists() {
if cmd == "add" {
err := writeBlankSpec()
if err != nil {
fatal("failed to write blank spec", err)
}
} else {
fatal("tools.json does not yet exist. You need to add a tool first with 'retool add'", nil)
}
}
s, err := read()
if err != nil {
fatal("failed to load tools.json", err)
}
switch cmd {
case "add":
s.add(tool)
case "upgrade":
s.upgrade(tool)
case "remove":
s.remove(tool)
case "build":
s.build()
case "sync":
s.sync()
case "do":
s.sync()
do()
case "clean":
log("the clean subcommand is deprecated and has no effect")
default:
fatal(fmt.Sprintf("unknown cmd %q", cmd), nil)
}
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/manifest.go
================================================
package main
import (
"encoding/json"
"os"
"path/filepath"
)
const manifestFile = "manifest.json"
type manifest map[string]string
func getManifest() manifest {
m := manifest{}
file, err := os.Open(filepath.Join(toolDirPath, manifestFile))
if err != nil {
return m
}
defer func() {
_ = file.Close()
}()
err = json.NewDecoder(file).Decode(&m)
if err != nil {
fatal("Failed to decode manifest", err)
}
return m
}
func (m manifest) write() {
f, err := os.Create(filepath.Join(toolDirPath, manifestFile))
if err != nil {
return
}
defer func() {
_ = f.Close()
}()
bytes, err := json.MarshalIndent(m, "", " ")
if err != nil {
return
}
_, _ = f.Write(bytes)
}
func (m manifest) outOfDate(ts []*tool) bool {
// Make a copy to check for elements in ts but not m
m2 := make(map[string]string)
for k, v := range m {
m2[k] = v
}
for _, t := range ts {
if v, ok := m[t.Repository]; !ok || v != t.Commit {
return true
}
delete(m2, t.Repository)
}
return len(m2) != 0
}
func (m manifest) replace(ts []*tool) {
for k := range m {
delete(m, k)
}
for _, t := range ts {
m[t.Repository] = t.Commit
}
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/print.go
================================================
package main
import (
"fmt"
"os"
"os/exec"
"github.com/pkg/errors"
)
func log(msg string) {
fmt.Fprintf(os.Stderr, "retool: %s\n", msg)
}
func fatal(msg string, err error) {
if err == nil {
fmt.Fprintf(os.Stderr, "retool: fatal err: %s\n", msg)
} else {
fmt.Fprintf(os.Stderr, "retool: fatal err: %s: %s\n", msg, err)
}
os.Exit(1)
}
func fatalExec(cmd string, err error) {
if exErr, ok := errors.Cause(err).(*exec.ExitError); ok {
fatal(fmt.Sprintf("execution error on %q: %s", cmd, exErr.Stderr), err)
} else {
fatal(fmt.Sprintf("execution error on %q", cmd), err)
}
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/remove.go
================================================
package main
func (s spec) remove(t *tool) {
idx := s.find(t)
if idx == -1 {
fatal(t.Repository+" is not in tools.json", nil)
}
s.Tools = append(s.Tools[:idx], s.Tools[idx+1:]...)
err := s.write()
if err != nil {
fatal("unable to remove "+t.Repository, err)
}
s.sync()
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/spec.go
================================================
package main
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"github.com/Masterminds/semver"
)
// Filename to read/write the spec data.
const specfile = "tools.json"
type spec struct {
Tools []*tool
RetoolVersion *semver.Version
}
// jsonSpec is a helper type to describe the JSON encoding of a spec
type jsonSpec struct {
Tools []*tool
RetoolVersion string
}
func (s *spec) UnmarshalJSON(data []byte) error {
js := new(jsonSpec)
if err := json.Unmarshal(data, js); err != nil {
return err
}
if js.RetoolVersion != "" {
v, err := semver.NewVersion(js.RetoolVersion)
if err != nil {
return err
}
s.RetoolVersion = v
}
s.Tools = js.Tools
return nil
}
func (s spec) MarshalJSON() ([]byte, error) {
return json.Marshal(&jsonSpec{
Tools: s.Tools,
RetoolVersion: s.RetoolVersion.String(),
})
}
func (s spec) write() error {
specfilePath := filepath.Join(baseDirPath, specfile)
f, err := os.Create(specfilePath)
if err != nil {
return fmt.Errorf("unable to open %s: %s", specfile, err)
}
defer func() {
_ = f.Close()
}()
// s.write() is called when we have successfully added, removed, or upgraded a
// tool. The success of that operation indicates that we should be comfortable
// bumping up this version.
s.RetoolVersion = version
bytes, err := json.MarshalIndent(s, "", " ")
if err != nil {
return fmt.Errorf("unable to marshal json spec: %s", err)
}
_, err = f.Write(bytes)
if err != nil {
return fmt.Errorf("unable to write %s: %s", specfile, err)
}
return nil
}
func (s spec) find(t *tool) int {
for i, tt := range s.Tools {
if t.Repository == tt.Repository {
return i
}
}
return -1
}
func (s spec) cleanup() {
var pkgs []string
for _, t := range s.Tools {
pkgs = append(pkgs, t.Repository)
}
clean(pkgs)
}
func readPath(path string) (spec, error) {
file, err := os.Open(path)
if err != nil {
return spec{}, fmt.Errorf("unable to open spec file at %s: %s", path, err)
}
defer func() {
_ = file.Close()
}()
s := new(spec)
err = json.NewDecoder(file).Decode(s)
if err != nil {
return spec{}, err
}
return *s, nil
}
func read() (spec, error) {
specfilePath := filepath.Join(baseDirPath, specfile)
return readPath(specfilePath)
}
func specExists() bool {
specfilePath := filepath.Join(baseDirPath, specfile)
_, err := os.Stat(specfilePath)
if os.IsNotExist(err) {
return false
}
if err != nil {
fatal("unable to stat tools.json: %s", err)
}
return true
}
func writeBlankSpec() error {
return spec{
Tools: []*tool{},
RetoolVersion: version,
}.write()
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/sync.go
================================================
package main
import "os"
func (s spec) sync() {
m := getManifest()
if m.outOfDate(s.Tools) {
// Delete existing tools directory
err := os.RemoveAll(toolDirPath)
if err != nil {
fatalExec("failed to remove _tools ", err)
}
// Recreate the tools directory
err = ensureTooldir()
if err != nil {
fatal("failed to ensure tool dir", err)
}
// Download everything to tool directory
for _, t := range s.Tools {
err = download(t)
if err != nil {
fatalExec("failed to sync "+t.Repository, err)
}
}
// Install the packages
s.build()
// Delete unneccessary source files
s.cleanup()
}
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/tool.go
================================================
package main
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/pkg/errors"
)
type tool struct {
Repository string // eg "github.com/tools/godep"
Commit string // eg "3020345802e4bff23902cfc1d19e90a79fae714e"
ref string // eg "origin/master"
Fork string `json:"Fork,omitempty"` // eg "code.jusin.tv/twitch/godep"
}
func (t *tool) path() string {
return filepath.Join(toolDirPath, "src", t.Repository)
}
func (t *tool) executable() string {
return filepath.Base(t.Repository)
}
func setEnvVar(cmd *exec.Cmd, key, val string) {
var env []string
if cmd.Env != nil {
env = cmd.Env
} else {
env = os.Environ()
}
envSet := false
for i, envVar := range env {
if strings.HasPrefix(envVar, key+"=") {
env[i] = key + "=" + val
envSet = true
}
}
if !envSet {
env = append(cmd.Env, key+"="+val)
}
cmd.Env = env
}
func get(t *tool) error {
log("downloading " + t.Repository)
cmd := exec.Command("go", "get", "-d", t.Repository)
setEnvVar(cmd, "GOPATH", toolDirPath)
_, err := cmd.Output()
if err != nil {
return errors.Wrap(err, "failed to 'go get' tool")
}
return err
}
func setVersion(t *tool) error {
// If we're using a fork, add it
if t.Fork != "" {
cmd := exec.Command("git", "remote")
cmd.Dir = t.path()
b, err := cmd.Output()
if err != nil {
return err
}
rs := strings.Split(string(b), "\n")
containsFork := false
for _, r := range rs {
if r == "fork" {
containsFork = true
break
}
}
if containsFork {
cmd = exec.Command("git", "remote", "rm", "fork")
cmd.Dir = t.path()
_, err = cmd.Output()
if err != nil {
return err
}
}
cmd = exec.Command("git", "remote", "add", "-f", "fork", t.Fork)
cmd.Dir = t.path()
_, err = cmd.Output()
if err != nil {
return err
}
}
log("setting version for " + t.Repository)
cmd := exec.Command("git", "fetch")
cmd.Dir = t.path()
_, err := cmd.Output()
if err != nil {
return err
}
// If we have a symbolic reference, parse it
if t.ref != "" {
log(fmt.Sprintf("parsing revision %q", t.ref))
cmd = exec.Command("git", "rev-parse", t.ref)
cmd.Dir = t.path()
var out []byte
out, err = cmd.Output()
if err != nil {
return err
}
t.Commit = strings.TrimSpace(string(out))
log(fmt.Sprintf("parsed as %q", t.Commit))
}
cmd = exec.Command("git", "checkout", t.Commit)
cmd.Dir = t.path()
_, err = cmd.Output()
if err != nil {
return errors.Wrap(err, "failed to 'git checkout' tool")
}
// Re-run 'go get' in case the new version has a different set of dependencies.
cmd = exec.Command("go", "get", "-d", t.Repository)
setEnvVar(cmd, "GOPATH", toolDirPath)
_, err = cmd.Output()
if err != nil {
return errors.Wrap(err, "failed to 'go get' tool")
}
return err
}
func download(t *tool) error {
err := get(t)
if err != nil {
fatalExec("go get -d "+t.Repository, err)
}
err = setVersion(t)
if err != nil {
fatalExec("git checkout "+t.Commit, err)
}
return nil
}
func install(t *tool) error {
log("installing " + t.Repository)
cmd := exec.Command("go", "install", t.Repository)
setEnvVar(cmd, "GOPATH", toolDirPath)
_, err := cmd.Output()
if err != nil {
return errors.Wrap(err, "failed to 'go install' tool")
}
return err
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/tooldir.go
================================================
package main
import (
"flag"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"syscall"
"github.com/pkg/errors"
)
const (
toolDirName = "_tools"
)
var (
baseDir = flag.String("base-dir", "",
"Path of project root. If not specified and the working directory is within a git repository, the root of "+
"the repository is used. If the working directory is not within a git repository, the working directory "+
"is used.")
toolDir = flag.String("tool-dir", "",
"Path where tools are stored. The default value is the subdirectory of -base-dir named '_tools'.")
// These globals are set by ensureTooldir() after factoring in the flags above.
baseDirPath string
toolDirPath string
)
// If the working directory is within a git repository, return the path of the repository's root; otherwise, return the
// empty string. An error is returned iff invoking 'git' fails for some other reason.
func getRepoRoot() (string, error) {
cmd := exec.Command("git", "rev-parse", "--show-toplevel")
stdout, err := cmd.Output()
if err != nil {
if exitErr, ok := err.(*exec.ExitError); ok {
exitStatus := exitErr.Sys().(syscall.WaitStatus).ExitStatus()
if exitStatus == 128 { // not in a repository
return "", nil
}
}
return "", errors.Wrap(err, "failed to invoke git")
}
repoRoot := strings.TrimSpace(string(stdout))
return repoRoot, nil
}
func ensureTooldir() error {
var err error
baseDirPath = *baseDir
if baseDirPath == "" {
var repoRootPath string
repoRootPath, err = getRepoRoot()
if err != nil {
return errors.Wrap(err, "failed to check for enclosing git repository")
}
if repoRootPath == "" {
baseDirPath, err = os.Getwd()
if err != nil {
return errors.Wrap(err, "failed to get working directory")
}
} else {
baseDirPath = repoRootPath
}
}
toolDirPath = *toolDir
if toolDirPath == "" {
toolDirPath = filepath.Join(baseDirPath, toolDirName)
}
verbosef("base dir: %v\n", baseDirPath)
verbosef("tool dir: %v\n", toolDirPath)
stat, err := os.Stat(toolDirPath)
switch {
case os.IsNotExist(err):
err = os.Mkdir(toolDirPath, 0777)
if err != nil {
return errors.Wrap(err, "unable to create tooldir")
}
case err != nil:
return errors.Wrap(err, "unable to stat tool directory")
case !stat.IsDir():
return errors.New("tool directory already exists, but it is not a directory; you can use -tool-dir to change where tools are saved")
}
err = ioutil.WriteFile(path.Join(toolDirPath, ".gitignore"), gitignore, 0664)
if err != nil {
return errors.Wrap(err, "unable to update .gitignore")
}
return nil
}
var gitignore = []byte(strings.TrimLeft(`
/bin/
/pkg/
/manifest.json
`, "\n"))
================================================
FILE: _tools/src/github.com/twitchtv/retool/upgrade.go
================================================
package main
func (s spec) upgrade(t *tool) {
idx := s.find(t)
if idx == -1 {
log(t.Repository + " is not yet installed (did you mean retool add?)")
return
}
s.Tools[idx] = t
s.sync()
err := s.write()
if err != nil {
fatal("unable to remove "+t.Repository, err)
}
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/LICENSE.txt
================================================
The Masterminds
Copyright (C) 2014-2015, Matt Butcher and Matt Farina
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.
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/README.md
================================================
# SemVer
The `semver` package provides the ability to work with [Semantic Versions](http://semver.org) in Go. Specifically it provides the ability to:
* Parse semantic versions
* Sort semantic versions
* Check if a semantic version fits within a set of constraints
* Optionally work with a `v` prefix
[](https://travis-ci.org/Masterminds/semver) [](https://ci.appveyor.com/project/mattfarina/semver/branch/master) [](https://godoc.org/github.com/Masterminds/semver) [](https://goreportcard.com/report/github.com/Masterminds/semver)
## Parsing Semantic Versions
To parse a semantic version use the `NewVersion` function. For example,
```go
v, err := semver.NewVersion("1.2.3-beta.1+build345")
```
If there is an error the version wasn't parseable. The version object has methods
to get the parts of the version, compare it to other versions, convert the
version back into a string, and get the original string. For more details
please see the [documentation](https://godoc.org/github.com/Masterminds/semver).
## Sorting Semantic Versions
A set of versions can be sorted using the [`sort`](https://golang.org/pkg/sort/)
package from the standard library. For example,
```go
raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",}
vs := make([]*semver.Version, len(raw))
for i, r := range raw {
v, err := semver.NewVersion(r)
if err != nil {
t.Errorf("Error parsing version: %s", err)
}
vs[i] = v
}
sort.Sort(semver.Collection(vs))
```
## Checking Version Constraints
Checking a version against version constraints is one of the most featureful
parts of the package.
```go
c, err := semver.NewConstraint(">= 1.2.3")
if err != nil {
// Handle constraint not being parseable.
}
v, _ := semver.NewVersion("1.3")
if err != nil {
// Handle version not being parseable.
}
// Check if the version meets the constraints. The a variable will be true.
a := c.Check(v)
```
## Basic Comparisons
There are two elements to the comparisons. First, a comparison string is a list
of comma separated and comparisons. These are then separated by || separated or
comparisons. For example, `">= 1.2, < 3.0.0 || >= 4.2.3"` is looking for a
comparison that's greater than or equal to 1.2 and less than 3.0.0 or is
greater than or equal to 4.2.3.
The basic comparisons are:
* `=`: equal (aliased to no operator)
* `!=`: not equal
* `>`: greater than
* `<`: less than
* `>=`: greater than or equal to
* `<=`: less than or equal to
_Note, according to the Semantic Version specification pre-releases may not be
API compliant with their release counterpart. It says,_
> _A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version._
_SemVer comparisons without a pre-release value will skip pre-release versions.
For example, `>1.2.3` will skip pre-releases when looking at a list of values
while `>1.2.3-alpha.1` will evaluate pre-releases._
## Hyphen Range Comparisons
There are multiple methods to handle ranges and the first is hyphens ranges.
These look like:
* `1.2 - 1.4.5` which is equivalent to `>= 1.2, <= 1.4.5`
* `2.3.4 - 4.5` which is equivalent to `>= 2.3.4, <= 4.5`
## Wildcards In Comparisons
The `x`, `X`, and `*` characters can be used as a wildcard character. This works
for all comparison operators. When used on the `=` operator it falls
back to the pack level comparison (see tilde below). For example,
* `1.2.x` is equivalent to `>= 1.2.0, < 1.3.0`
* `>= 1.2.x` is equivalent to `>= 1.2.0`
* `<= 2.x` is equivalent to `<= 3`
* `*` is equivalent to `>= 0.0.0`
## Tilde Range Comparisons (Patch)
The tilde (`~`) comparison operator is for patch level ranges when a minor
version is specified and major level changes when the minor number is missing.
For example,
* `~1.2.3` is equivalent to `>= 1.2.3, < 1.3.0`
* `~1` is equivalent to `>= 1, < 2`
* `~2.3` is equivalent to `>= 2.3, < 2.4`
* `~1.2.x` is equivalent to `>= 1.2.0, < 1.3.0`
* `~1.x` is equivalent to `>= 1, < 2`
## Caret Range Comparisons (Major)
The caret (`^`) comparison operator is for major level changes. This is useful
when comparisons of API versions as a major change is API breaking. For example,
* `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0`
* `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0`
* `^2.3` is equivalent to `>= 2.3, < 3`
* `^2.x` is equivalent to `>= 2.0.0, < 3`
# Validation
In addition to testing a version against a constraint, a version can be validated
against a constraint. When validation fails a slice of errors containing why a
version didn't meet the constraint is returned. For example,
```go
c, err := semver.NewConstraint("<= 1.2.3, >= 1.4")
if err != nil {
// Handle constraint not being parseable.
}
v, _ := semver.NewVersion("1.3")
if err != nil {
// Handle version not being parseable.
}
// Validate a version against a constraint.
a, msgs := c.Validate(v)
// a is false
for _, m := range msgs {
fmt.Println(m)
// Loops over the errors which would read
// "1.3 is greater than 1.2.3"
// "1.3 is less than 1.4"
}
```
# Contribute
If you find an issue or want to contribute please file an [issue](https://github.com/Masterminds/semver/issues)
or [create a pull request](https://github.com/Masterminds/semver/pulls).
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/collection.go
================================================
package semver
// Collection is a collection of Version instances and implements the sort
// interface. See the sort package for more details.
// https://golang.org/pkg/sort/
type Collection []*Version
// Len returns the length of a collection. The number of Version instances
// on the slice.
func (c Collection) Len() int {
return len(c)
}
// Less is needed for the sort interface to compare two Version objects on the
// slice. If checks if one is less than the other.
func (c Collection) Less(i, j int) bool {
return c[i].LessThan(c[j])
}
// Swap is needed for the sort interface to replace the Version objects
// at two different positions in the slice.
func (c Collection) Swap(i, j int) {
c[i], c[j] = c[j], c[i]
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/constraints.go
================================================
package semver
import (
"errors"
"fmt"
"regexp"
"strings"
)
// Constraints is one or more constraint that a semantic version can be
// checked against.
type Constraints struct {
constraints [][]*constraint
}
// NewConstraint returns a Constraints instance that a Version instance can
// be checked against. If there is a parse error it will be returned.
func NewConstraint(c string) (*Constraints, error) {
// Rewrite - ranges into a comparison operation.
c = rewriteRange(c)
ors := strings.Split(c, "||")
or := make([][]*constraint, len(ors))
for k, v := range ors {
cs := strings.Split(v, ",")
result := make([]*constraint, len(cs))
for i, s := range cs {
pc, err := parseConstraint(s)
if err != nil {
return nil, err
}
result[i] = pc
}
or[k] = result
}
o := &Constraints{constraints: or}
return o, nil
}
// Check tests if a version satisfies the constraints.
func (cs Constraints) Check(v *Version) bool {
// loop over the ORs and check the inner ANDs
for _, o := range cs.constraints {
joy := true
for _, c := range o {
if !c.check(v) {
joy = false
break
}
}
if joy {
return true
}
}
return false
}
// Validate checks if a version satisfies a constraint. If not a slice of
// reasons for the failure are returned in addition to a bool.
func (cs Constraints) Validate(v *Version) (bool, []error) {
// loop over the ORs and check the inner ANDs
var e []error
for _, o := range cs.constraints {
joy := true
for _, c := range o {
if !c.check(v) {
em := fmt.Errorf(c.msg, v, c.orig)
e = append(e, em)
joy = false
}
}
if joy {
return true, []error{}
}
}
return false, e
}
var constraintOps map[string]cfunc
var constraintMsg map[string]string
var constraintRegex *regexp.Regexp
func init() {
constraintOps = map[string]cfunc{
"": constraintTildeOrEqual,
"=": constraintTildeOrEqual,
"!=": constraintNotEqual,
">": constraintGreaterThan,
"<": constraintLessThan,
">=": constraintGreaterThanEqual,
"=>": constraintGreaterThanEqual,
"<=": constraintLessThanEqual,
"=<": constraintLessThanEqual,
"~": constraintTilde,
"~>": constraintTilde,
"^": constraintCaret,
}
constraintMsg = map[string]string{
"": "%s is not equal to %s",
"=": "%s is not equal to %s",
"!=": "%s is equal to %s",
">": "%s is less than or equal to %s",
"<": "%s is greater than or equal to %s",
">=": "%s is less than %s",
"=>": "%s is less than %s",
"<=": "%s is greater than %s",
"=<": "%s is greater than %s",
"~": "%s does not have same major and minor version as %s",
"~>": "%s does not have same major and minor version as %s",
"^": "%s does not have same major version as %s",
}
ops := make([]string, 0, len(constraintOps))
for k := range constraintOps {
ops = append(ops, regexp.QuoteMeta(k))
}
constraintRegex = regexp.MustCompile(fmt.Sprintf(
`^\s*(%s)\s*(%s)\s*$`,
strings.Join(ops, "|"),
cvRegex))
constraintRangeRegex = regexp.MustCompile(fmt.Sprintf(
`\s*(%s)\s+-\s+(%s)\s*`,
cvRegex, cvRegex))
}
// An individual constraint
type constraint struct {
// The callback function for the restraint. It performs the logic for
// the constraint.
function cfunc
msg string
// The version used in the constraint check. For example, if a constraint
// is '<= 2.0.0' the con a version instance representing 2.0.0.
con *Version
// The original parsed version (e.g., 4.x from != 4.x)
orig string
// When an x is used as part of the version (e.g., 1.x)
minorDirty bool
dirty bool
patchDirty bool
}
// Check if a version meets the constraint
func (c *constraint) check(v *Version) bool {
return c.function(v, c)
}
type cfunc func(v *Version, c *constraint) bool
func parseConstraint(c string) (*constraint, error) {
m := constraintRegex.FindStringSubmatch(c)
if m == nil {
return nil, fmt.Errorf("improper constraint: %s", c)
}
ver := m[2]
orig := ver
minorDirty := false
patchDirty := false
dirty := false
if isX(m[3]) {
ver = "0.0.0"
dirty = true
} else if isX(strings.TrimPrefix(m[4], ".")) {
minorDirty = true
dirty = true
ver = fmt.Sprintf("%s.0.0%s", m[3], m[6])
} else if isX(strings.TrimPrefix(m[5], ".")) {
dirty = true
patchDirty = true
ver = fmt.Sprintf("%s%s.0%s", m[3], m[4], m[6])
}
con, err := NewVersion(ver)
if err != nil {
// The constraintRegex should catch any regex parsing errors. So,
// we should never get here.
return nil, errors.New("constraint Parser Error")
}
cs := &constraint{
function: constraintOps[m[1]],
msg: constraintMsg[m[1]],
con: con,
orig: orig,
minorDirty: minorDirty,
patchDirty: patchDirty,
dirty: dirty,
}
return cs, nil
}
// Constraint functions
func constraintNotEqual(v *Version, c *constraint) bool {
if c.dirty {
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false
}
if c.con.Major() != v.Major() {
return true
}
if c.con.Minor() != v.Minor() && !c.minorDirty {
return true
} else if c.minorDirty {
return false
}
return false
}
return !v.Equal(c.con)
}
func constraintGreaterThan(v *Version, c *constraint) bool {
// An edge case the constraint is 0.0.0 and the version is 0.0.0-someprerelease
// exists. This that case.
if !isNonZero(c.con) && isNonZero(v) {
return true
}
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false
}
return v.Compare(c.con) == 1
}
func constraintLessThan(v *Version, c *constraint) bool {
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false
}
if !c.dirty {
return v.Compare(c.con) < 0
}
if v.Major() > c.con.Major() {
return false
} else if v.Minor() > c.con.Minor() && !c.minorDirty {
return false
}
return true
}
func constraintGreaterThanEqual(v *Version, c *constraint) bool {
// An edge case the constraint is 0.0.0 and the version is 0.0.0-someprerelease
// exists. This that case.
if !isNonZero(c.con) && isNonZero(v) {
return true
}
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false
}
return v.Compare(c.con) >= 0
}
func constraintLessThanEqual(v *Version, c *constraint) bool {
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false
}
if !c.dirty {
return v.Compare(c.con) <= 0
}
if v.Major() > c.con.Major() {
return false
} else if v.Minor() > c.con.Minor() && !c.minorDirty {
return false
}
return true
}
// ~*, ~>* --> >= 0.0.0 (any)
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0, <3.0.0
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0, <2.1.0
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0, <1.3.0
// ~1.2.3, ~>1.2.3 --> >=1.2.3, <1.3.0
// ~1.2.0, ~>1.2.0 --> >=1.2.0, <1.3.0
func constraintTilde(v *Version, c *constraint) bool {
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false
}
if v.LessThan(c.con) {
return false
}
// ~0.0.0 is a special case where all constraints are accepted. It's
// equivalent to >= 0.0.0.
if c.con.Major() == 0 && c.con.Minor() == 0 && c.con.Patch() == 0 &&
!c.minorDirty && !c.patchDirty {
return true
}
if v.Major() != c.con.Major() {
return false
}
if v.Minor() != c.con.Minor() && !c.minorDirty {
return false
}
return true
}
// When there is a .x (dirty) status it automatically opts in to ~. Otherwise
// it's a straight =
func constraintTildeOrEqual(v *Version, c *constraint) bool {
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false
}
if c.dirty {
c.msg = constraintMsg["~"]
return constraintTilde(v, c)
}
return v.Equal(c.con)
}
// ^* --> (any)
// ^2, ^2.x, ^2.x.x --> >=2.0.0, <3.0.0
// ^2.0, ^2.0.x --> >=2.0.0, <3.0.0
// ^1.2, ^1.2.x --> >=1.2.0, <2.0.0
// ^1.2.3 --> >=1.2.3, <2.0.0
// ^1.2.0 --> >=1.2.0, <2.0.0
func constraintCaret(v *Version, c *constraint) bool {
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false
}
if v.LessThan(c.con) {
return false
}
if v.Major() != c.con.Major() {
return false
}
return true
}
var constraintRangeRegex *regexp.Regexp
const cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` +
`(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` +
`(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?`
func isX(x string) bool {
switch x {
case "x", "*", "X":
return true
default:
return false
}
}
func rewriteRange(i string) string {
m := constraintRangeRegex.FindAllStringSubmatch(i, -1)
if m == nil {
return i
}
o := i
for _, v := range m {
t := fmt.Sprintf(">= %s, <= %s", v[1], v[11])
o = strings.Replace(o, v[0], t, 1)
}
return o
}
// Detect if a version is not zero (0.0.0)
func isNonZero(v *Version) bool {
if v.Major() != 0 || v.Minor() != 0 || v.Patch() != 0 || v.Prerelease() != "" {
return true
}
return false
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/doc.go
================================================
/*
Package semver provides the ability to work with Semantic Versions (http://semver.org) in Go.
Specifically it provides the ability to:
* Parse semantic versions
* Sort semantic versions
* Check if a semantic version fits within a set of constraints
* Optionally work with a `v` prefix
Parsing Semantic Versions
To parse a semantic version use the `NewVersion` function. For example,
v, err := semver.NewVersion("1.2.3-beta.1+build345")
If there is an error the version wasn't parseable. The version object has methods
to get the parts of the version, compare it to other versions, convert the
version back into a string, and get the original string. For more details
please see the documentation at https://godoc.org/github.com/Masterminds/semver.
Sorting Semantic Versions
A set of versions can be sorted using the `sort` package from the standard library.
For example,
raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",}
vs := make([]*semver.Version, len(raw))
for i, r := range raw {
v, err := semver.NewVersion(r)
if err != nil {
t.Errorf("Error parsing version: %s", err)
}
vs[i] = v
}
sort.Sort(semver.Collection(vs))
Checking Version Constraints
Checking a version against version constraints is one of the most featureful
parts of the package.
c, err := semver.NewConstraint(">= 1.2.3")
if err != nil {
// Handle constraint not being parseable.
}
v, _ := semver.NewVersion("1.3")
if err != nil {
// Handle version not being parseable.
}
// Check if the version meets the constraints. The a variable will be true.
a := c.Check(v)
Basic Comparisons
There are two elements to the comparisons. First, a comparison string is a list
of comma separated and comparisons. These are then separated by || separated or
comparisons. For example, `">= 1.2, < 3.0.0 || >= 4.2.3"` is looking for a
comparison that's greater than or equal to 1.2 and less than 3.0.0 or is
greater than or equal to 4.2.3.
The basic comparisons are:
* `=`: equal (aliased to no operator)
* `!=`: not equal
* `>`: greater than
* `<`: less than
* `>=`: greater than or equal to
* `<=`: less than or equal to
Hyphen Range Comparisons
There are multiple methods to handle ranges and the first is hyphens ranges.
These look like:
* `1.2 - 1.4.5` which is equivalent to `>= 1.2, <= 1.4.5`
* `2.3.4 - 4.5` which is equivalent to `>= 2.3.4, <= 4.5`
Wildcards In Comparisons
The `x`, `X`, and `*` characters can be used as a wildcard character. This works
for all comparison operators. When used on the `=` operator it falls
back to the pack level comparison (see tilde below). For example,
* `1.2.x` is equivalent to `>= 1.2.0, < 1.3.0`
* `>= 1.2.x` is equivalent to `>= 1.2.0`
* `<= 2.x` is equivalent to `<= 3`
* `*` is equivalent to `>= 0.0.0`
Tilde Range Comparisons (Patch)
The tilde (`~`) comparison operator is for patch level ranges when a minor
version is specified and major level changes when the minor number is missing.
For example,
* `~1.2.3` is equivalent to `>= 1.2.3, < 1.3.0`
* `~1` is equivalent to `>= 1, < 2`
* `~2.3` is equivalent to `>= 2.3, < 2.4`
* `~1.2.x` is equivalent to `>= 1.2.0, < 1.3.0`
* `~1.x` is equivalent to `>= 1, < 2`
Caret Range Comparisons (Major)
The caret (`^`) comparison operator is for major level changes. This is useful
when comparisons of API versions as a major change is API breaking. For example,
* `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0`
* `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0`
* `^2.3` is equivalent to `>= 2.3, < 3`
* `^2.x` is equivalent to `>= 2.0.0, < 3`
*/
package semver
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/version.go
================================================
package semver
import (
"bytes"
"errors"
"fmt"
"regexp"
"strconv"
"strings"
)
// The compiled version of the regex created at init() is cached here so it
// only needs to be created once.
var versionRegex *regexp.Regexp
var validPrereleaseRegex *regexp.Regexp
var (
// ErrInvalidSemVer is returned a version is found to be invalid when
// being parsed.
ErrInvalidSemVer = errors.New("Invalid Semantic Version")
// ErrInvalidMetadata is returned when the metadata is an invalid format
ErrInvalidMetadata = errors.New("Invalid Metadata string")
// ErrInvalidPrerelease is returned when the pre-release is an invalid format
ErrInvalidPrerelease = errors.New("Invalid Prerelease string")
)
// SemVerRegex is the regular expression used to parse a semantic version.
const SemVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` +
`(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` +
`(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?`
// ValidPrerelease is the regular expression which validates
// both prerelease and metadata values.
const ValidPrerelease string = `^([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*)`
// Version represents a single semantic version.
type Version struct {
major, minor, patch int64
pre string
metadata string
original string
}
func init() {
versionRegex = regexp.MustCompile("^" + SemVerRegex + "$")
validPrereleaseRegex = regexp.MustCompile(ValidPrerelease)
}
// NewVersion parses a given version and returns an instance of Version or
// an error if unable to parse the version.
func NewVersion(v string) (*Version, error) {
m := versionRegex.FindStringSubmatch(v)
if m == nil {
return nil, ErrInvalidSemVer
}
sv := &Version{
metadata: m[8],
pre: m[5],
original: v,
}
var temp int64
temp, err := strconv.ParseInt(m[1], 10, 32)
if err != nil {
return nil, fmt.Errorf("Error parsing version segment: %s", err)
}
sv.major = temp
if m[2] != "" {
temp, err = strconv.ParseInt(strings.TrimPrefix(m[2], "."), 10, 32)
if err != nil {
return nil, fmt.Errorf("Error parsing version segment: %s", err)
}
sv.minor = temp
} else {
sv.minor = 0
}
if m[3] != "" {
temp, err = strconv.ParseInt(strings.TrimPrefix(m[3], "."), 10, 32)
if err != nil {
return nil, fmt.Errorf("Error parsing version segment: %s", err)
}
sv.patch = temp
} else {
sv.patch = 0
}
return sv, nil
}
// MustParse parses a given version and panics on error.
func MustParse(v string) *Version {
sv, err := NewVersion(v)
if err != nil {
panic(err)
}
return sv
}
// String converts a Version object to a string.
// Note, if the original version contained a leading v this version will not.
// See the Original() method to retrieve the original value. Semantic Versions
// don't contain a leading v per the spec. Instead it's optional on
// impelementation.
func (v *Version) String() string {
var buf bytes.Buffer
fmt.Fprintf(&buf, "%d.%d.%d", v.major, v.minor, v.patch)
if v.pre != "" {
fmt.Fprintf(&buf, "-%s", v.pre)
}
if v.metadata != "" {
fmt.Fprintf(&buf, "+%s", v.metadata)
}
return buf.String()
}
// Original returns the original value passed in to be parsed.
func (v *Version) Original() string {
return v.original
}
// Major returns the major version.
func (v *Version) Major() int64 {
return v.major
}
// Minor returns the minor version.
func (v *Version) Minor() int64 {
return v.minor
}
// Patch returns the patch version.
func (v *Version) Patch() int64 {
return v.patch
}
// Prerelease returns the pre-release version.
func (v *Version) Prerelease() string {
return v.pre
}
// Metadata returns the metadata on the version.
func (v *Version) Metadata() string {
return v.metadata
}
// originalVPrefix returns the original 'v' prefix if any.
func (v *Version) originalVPrefix() string {
// Note, only lowercase v is supported as a prefix by the parser.
if v.original != "" && v.original[:1] == "v" {
return v.original[:1]
}
return ""
}
// IncPatch produces the next patch version.
// If the current version does not have prerelease/metadata information,
// it unsets metadata and prerelease values, increments patch number.
// If the current version has any of prerelease or metadata information,
// it unsets both values and keeps curent patch value
func (v Version) IncPatch() Version {
vNext := v
// according to http://semver.org/#spec-item-9
// Pre-release versions have a lower precedence than the associated normal version.
// according to http://semver.org/#spec-item-10
// Build metadata SHOULD be ignored when determining version precedence.
if v.pre != "" {
vNext.metadata = ""
vNext.pre = ""
} else {
vNext.metadata = ""
vNext.pre = ""
vNext.patch = v.patch + 1
}
vNext.original = v.originalVPrefix() + "" + vNext.String()
return vNext
}
// IncMinor produces the next minor version.
// Sets patch to 0.
// Increments minor number.
// Unsets metadata.
// Unsets prerelease status.
func (v Version) IncMinor() Version {
vNext := v
vNext.metadata = ""
vNext.pre = ""
vNext.patch = 0
vNext.minor = v.minor + 1
vNext.original = v.originalVPrefix() + "" + vNext.String()
return vNext
}
// IncMajor produces the next major version.
// Sets patch to 0.
// Sets minor to 0.
// Increments major number.
// Unsets metadata.
// Unsets prerelease status.
func (v Version) IncMajor() Version {
vNext := v
vNext.metadata = ""
vNext.pre = ""
vNext.patch = 0
vNext.minor = 0
vNext.major = v.major + 1
vNext.original = v.originalVPrefix() + "" + vNext.String()
return vNext
}
// SetPrerelease defines the prerelease value.
// Value must not include the required 'hypen' prefix.
func (v Version) SetPrerelease(prerelease string) (Version, error) {
vNext := v
if len(prerelease) > 0 && !validPrereleaseRegex.MatchString(prerelease) {
return vNext, ErrInvalidPrerelease
}
vNext.pre = prerelease
vNext.original = v.originalVPrefix() + "" + vNext.String()
return vNext, nil
}
// SetMetadata defines metadata value.
// Value must not include the required 'plus' prefix.
func (v Version) SetMetadata(metadata string) (Version, error) {
vNext := v
if len(metadata) > 0 && !validPrereleaseRegex.MatchString(metadata) {
return vNext, ErrInvalidMetadata
}
vNext.metadata = metadata
vNext.original = v.originalVPrefix() + "" + vNext.String()
return vNext, nil
}
// LessThan tests if one version is less than another one.
func (v *Version) LessThan(o *Version) bool {
return v.Compare(o) < 0
}
// GreaterThan tests if one version is greater than another one.
func (v *Version) GreaterThan(o *Version) bool {
return v.Compare(o) > 0
}
// Equal tests if two versions are equal to each other.
// Note, versions can be equal with different metadata since metadata
// is not considered part of the comparable version.
func (v *Version) Equal(o *Version) bool {
return v.Compare(o) == 0
}
// Compare compares this version to another one. It returns -1, 0, or 1 if
// the version smaller, equal, or larger than the other version.
//
// Versions are compared by X.Y.Z. Build metadata is ignored. Prerelease is
// lower than the version without a prerelease.
func (v *Version) Compare(o *Version) int {
// Compare the major, minor, and patch version for differences. If a
// difference is found return the comparison.
if d := compareSegment(v.Major(), o.Major()); d != 0 {
return d
}
if d := compareSegment(v.Minor(), o.Minor()); d != 0 {
return d
}
if d := compareSegment(v.Patch(), o.Patch()); d != 0 {
return d
}
// At this point the major, minor, and patch versions are the same.
ps := v.pre
po := o.Prerelease()
if ps == "" && po == "" {
return 0
}
if ps == "" {
return 1
}
if po == "" {
return -1
}
return comparePrerelease(ps, po)
}
func compareSegment(v, o int64) int {
if v < o {
return -1
}
if v > o {
return 1
}
return 0
}
func comparePrerelease(v, o string) int {
// split the prelease versions by their part. The separator, per the spec,
// is a .
sparts := strings.Split(v, ".")
oparts := strings.Split(o, ".")
// Find the longer length of the parts to know how many loop iterations to
// go through.
slen := len(sparts)
olen := len(oparts)
l := slen
if olen > slen {
l = olen
}
// Iterate over each part of the prereleases to compare the differences.
for i := 0; i < l; i++ {
// Since the lentgh of the parts can be different we need to create
// a placeholder. This is to avoid out of bounds issues.
stemp := ""
if i < slen {
stemp = sparts[i]
}
otemp := ""
if i < olen {
otemp = oparts[i]
}
d := comparePrePart(stemp, otemp)
if d != 0 {
return d
}
}
// Reaching here means two versions are of equal value but have different
// metadata (the part following a +). They are not identical in string form
// but the version comparison finds them to be equal.
return 0
}
func comparePrePart(s, o string) int {
// Fastpath if they are equal
if s == o {
return 0
}
// When s or o are empty we can use the other in an attempt to determine
// the response.
if o == "" {
_, n := strconv.ParseInt(s, 10, 64)
if n != nil {
return -1
}
return 1
}
if s == "" {
_, n := strconv.ParseInt(o, 10, 64)
if n != nil {
return 1
}
return -1
}
if s > o {
return 1
}
return -1
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/pkg/errors/LICENSE
================================================
Copyright (c) 2015, Dave Cheney <dave@cheney.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/pkg/errors/README.md
================================================
# errors [](https://travis-ci.org/pkg/errors) [](https://ci.appveyor.com/project/davecheney/errors/branch/master) [](http://godoc.org/github.com/pkg/errors) [](https://goreportcard.com/report/github.com/pkg/errors)
Package errors provides simple error handling primitives.
`go get github.com/pkg/errors`
The traditional error handling idiom in Go is roughly akin to
```go
if err != nil {
return err
}
```
which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error.
## Adding context to an error
The errors.Wrap function returns a new error that adds context to the original error. For example
```go
_, err := ioutil.ReadAll(r)
if err != nil {
return errors.Wrap(err, "read failed")
}
```
## Retrieving the cause of an error
Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`.
```go
type causer interface {
Cause() error
}
```
`errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example:
```go
switch err := errors.Cause(err).(type) {
case *MyError:
// handle specifically
default:
// unknown error
}
```
[Read the package documentation for more information](https://godoc.org/github.com/pkg/errors).
## Contributing
We welcome pull requests, bug fixes and issue reports. With that said, the bar for adding new symbols to this package is intentionally set high.
Before proposing a change, please discuss your change by raising an issue.
## Licence
BSD-2-Clause
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/pkg/errors/errors.go
================================================
// Package errors provides simple error handling primitives.
//
// The traditional error handling idiom in Go is roughly akin to
//
// if err != nil {
// return err
// }
//
// which applied recursively up the call stack results in error reports
// without context or debugging information. The errors package allows
// programmers to add context to the failure path in their code in a way
// that does not destroy the original value of the error.
//
// Adding context to an error
//
// The errors.Wrap function returns a new error that adds context to the
// original error by recording a stack trace at the point Wrap is called,
// and the supplied message. For example
//
// _, err := ioutil.ReadAll(r)
// if err != nil {
// return errors.Wrap(err, "read failed")
// }
//
// If additional control is required the errors.WithStack and errors.WithMessage
// functions destructure errors.Wrap into its component operations of annotating
// an error with a stack trace and an a message, respectively.
//
// Retrieving the cause of an error
//
// Using errors.Wrap constructs a stack of errors, adding context to the
// preceding error. Depending on the nature of the error it may be necessary
// to reverse the operation of errors.Wrap to retrieve the original error
// for inspection. Any error value which implements this interface
//
// type causer interface {
// Cause() error
// }
//
// can be inspected by errors.Cause. errors.Cause will recursively retrieve
// the topmost error which does not implement causer, which is assumed to be
// the original cause. For example:
//
// switch err := errors.Cause(err).(type) {
// case *MyError:
// // handle specifically
// default:
// // unknown error
// }
//
// causer interface is not exported by this package, but is considered a part
// of stable public API.
//
// Formatted printing of errors
//
// All error values returned from this package implement fmt.Formatter and can
// be formatted by the fmt package. The following verbs are supported
//
// %s print the error. If the error has a Cause it will be
// printed recursively
// %v see %s
// %+v extended format. Each Frame of the error's StackTrace will
// be printed in detail.
//
// Retrieving the stack trace of an error or wrapper
//
// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are
// invoked. This information can be retrieved with the following interface.
//
// type stackTracer interface {
// StackTrace() errors.StackTrace
// }
//
// Where errors.StackTrace is defined as
//
// type StackTrace []Frame
//
// The Frame type represents a call site in the stack trace. Frame supports
// the fmt.Formatter interface that can be used for printing information about
// the stack trace of this error. For example:
//
// if err, ok := err.(stackTracer); ok {
// for _, f := range err.StackTrace() {
// fmt.Printf("%+s:%d", f)
// }
// }
//
// stackTracer interface is not exported by this package, but is considered a part
// of stable public API.
//
// See the documentation for Frame.Format for more details.
package errors
import (
"fmt"
"io"
)
// New returns an error with the supplied message.
// New also records the stack trace at the point it was called.
func New(message string) error {
return &fundamental{
msg: message,
stack: callers(),
}
}
// Errorf formats according to a format specifier and returns the string
// as a value that satisfies error.
// Errorf also records the stack trace at the point it was called.
func Errorf(format string, args ...interface{}) error {
return &fundamental{
msg: fmt.Sprintf(format, args...),
stack: callers(),
}
}
// fundamental is an error that has a message and a stack, but no caller.
type fundamental struct {
msg string
*stack
}
func (f *fundamental) Error() string { return f.msg }
func (f *fundamental) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
if s.Flag('+') {
io.WriteString(s, f.msg)
f.stack.Format(s, verb)
return
}
fallthrough
case 's':
io.WriteString(s, f.msg)
case 'q':
fmt.Fprintf(s, "%q", f.msg)
}
}
// WithStack annotates err with a stack trace at the point WithStack was called.
// If err is nil, WithStack returns nil.
func WithStack(err error) error {
if err == nil {
return nil
}
return &withStack{
err,
callers(),
}
}
type withStack struct {
error
*stack
}
func (w *withStack) Cause() error { return w.error }
func (w *withStack) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
if s.Flag('+') {
fmt.Fprintf(s, "%+v", w.Cause())
w.stack.Format(s, verb)
return
}
fallthrough
case 's':
io.WriteString(s, w.Error())
case 'q':
fmt.Fprintf(s, "%q", w.Error())
}
}
// Wrap returns an error annotating err with a stack trace
// at the point Wrap is called, and the supplied message.
// If err is nil, Wrap returns nil.
func Wrap(err error, message string) error {
if err == nil {
return nil
}
err = &withMessage{
cause: err,
msg: message,
}
return &withStack{
err,
callers(),
}
}
// Wrapf returns an error annotating err with a stack trace
// at the point Wrapf is call, and the format specifier.
// If err is nil, Wrapf returns nil.
func Wrapf(err error, format string, args ...interface{}) error {
if err == nil {
return nil
}
err = &withMessage{
cause: err,
msg: fmt.Sprintf(format, args...),
}
return &withStack{
err,
callers(),
}
}
// WithMessage annotates err with a new message.
// If err is nil, WithMessage returns nil.
func WithMessage(err error, message string) error {
if err == nil {
return nil
}
return &withMessage{
cause: err,
msg: message,
}
}
type withMessage struct {
cause error
msg string
}
func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() }
func (w *withMessage) Cause() error { return w.cause }
func (w *withMessage) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
if s.Flag('+') {
fmt.Fprintf(s, "%+v\n", w.Cause())
io.WriteString(s, w.msg)
return
}
fallthrough
case 's', 'q':
io.WriteString(s, w.Error())
}
}
// Cause returns the underlying cause of the error, if possible.
// An error value has a cause if it implements the following
// interface:
//
// type causer interface {
// Cause() error
// }
//
// If the error does not implement Cause, the original error will
// be returned. If the error is nil, nil will be returned without further
// investigation.
func Cause(err error) error {
type causer interface {
Cause() error
}
for err != nil {
cause, ok := err.(causer)
if !ok {
break
}
err = cause.Cause()
}
return err
}
================================================
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/pkg/errors/stack.go
================================================
package errors
import (
"fmt"
"io"
"path"
"runtime"
"strings"
)
// Frame represents a program counter inside a stack frame.
type Frame uintptr
// pc returns the program counter for this frame;
// multiple frames may have the same PC value.
func (f Frame) pc() uintptr { return uintptr(f) - 1 }
// file returns the full path to the file that contains the
// function for this Frame's pc.
func (f Frame) file() string {
fn := runtime.FuncForPC(f.pc())
if fn == nil {
return "unknown"
}
file, _ := fn.FileLine(f.pc())
return file
}
// line returns the line number of source code of the
// function for this Frame's pc.
func (f Frame) line() int {
fn := runtime.FuncForPC(f.pc())
if fn == nil {
return 0
}
_, line := fn.FileLine(f.pc())
return line
}
// Format formats the frame according to the fmt.Formatter interface.
//
// %s source file
// %d source line
// %n function name
// %v equivalent to %s:%d
//
// Format accepts flags that alter the printing of some verbs, as follows:
//
// %+s path of source file relative to the compile time GOPATH
// %+v equivalent to %+s:%d
func (f Frame) Format(s fmt.State, verb rune) {
switch verb {
case 's':
switch {
case s.Flag('+'):
pc := f.pc()
fn := runtime.FuncForPC(pc)
if fn == nil {
io.WriteString(s, "unknown")
} else {
file, _ := fn.FileLine(pc)
fmt.Fprintf(s, "%s\n\t%s", fn.Name(), file)
}
default:
io.WriteString(s, path.Base(f.file()))
}
case 'd':
fmt.Fprintf(s, "%d", f.line())
case 'n':
name := runtime.FuncForPC(f.pc()).Name()
io.WriteString(s, funcname(name))
case 'v':
f.Format(s, 's')
io.WriteString(s, ":")
f.Format(s, 'd')
}
}
// StackTrace is stack of Frames from innermost (newest) to outermost (oldest).
type StackTrace []Frame
func (st StackTrace) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
switch {
case s.Flag('+'):
for _, f := range st {
fmt.Fprintf(s, "\n%+v", f)
}
case s.Flag('#'):
fmt.Fprintf(s, "%#v", []Frame(st))
default:
fmt.Fprintf(s, "%v", []Frame(st))
}
case 's':
fmt.Fprintf(s, "%s", []Frame(st))
}
}
// stack represents a stack of program counters.
type stack []uintptr
func (s *stack) Format(st fmt.State, verb rune) {
switch verb {
case 'v':
switch {
case st.Flag('+'):
for _, pc := range *s {
f := Frame(pc)
fmt.Fprintf(st, "\n%+v", f)
}
}
}
}
func (s *stack) StackTrace() StackTrace {
f := make([]Frame, len(*s))
for i := 0; i < len(f); i++ {
f[i] = Frame((*s)[i])
}
return f
}
func callers() *stack {
const depth = 32
var pcs [depth]uintptr
n := runtime.Callers(3, pcs[:])
var st stack = pcs[0:n]
return &st
}
// funcname removes the path prefix component of a function's name reported by func.Name().
func funcname(name string) string {
i := strings.LastIndex(name, "/")
name = name[i+1:]
i = strings.Index(name, ".")
return name[i+1:]
}
func trimGOPATH(name, file string) string {
// Here we want to get the source file path relative to the compile time
// GOPATH. As of Go 1.6.x there is no direct way to know the compiled
// GOPATH at runtime, but we can infer the number of path segments in the
// GOPATH. We note that fn.Name() returns the function name qualified by
// the import path, which does not include the GOPATH. Thus we can trim
// segments from the beginning of the file path until the number of path
// separators remaining is one more than the number of path separators in
// the function name. For example, given:
//
// GOPATH /home/user
// file /home/user/src/pkg/sub/file.go
// fn.Name() pkg/sub.Type.Method
//
// We want to produce:
//
// pkg/sub/file.go
//
// From this we can easily see that fn.Name() has one less path separator
// than our desired output. We count separators from the end of the file
// path until it finds two more than in the function name and then move
// one character forward to preserve the initial path segment without a
// leading separator.
const sep = "/"
goal := strings.Count(name, sep) + 2
i := len(file)
for n := 0; n < goal; n++ {
i = strings.LastIndex(file[:i], sep)
if i == -1 {
// not enough separators found, set i so that the slice expression
// below leaves file unmodified
i = -len(sep)
break
}
}
// get back to 0 or trim the leading separator
file = file[i+len(sep):]
return file
}
================================================
FILE: _tools/src/golang.org/x/sys/execabs/execabs.go
================================================
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package execabs is a drop-in replacement for os/exec
// that requires PATH lookups to find absolute paths.
// That is, execabs.Command("cmd") runs the same PATH lookup
// as exec.Command("cmd"), but if the result is a path
// which is relative, the Run and Start methods will report
// an error instead of running the executable.
//
// See https://blog.golang.org/path-security for more information
// about when it may be necessary or appropriate to use this package.
package execabs
import (
"context"
"fmt"
"os/exec"
"path/filepath"
"reflect"
"unsafe"
)
// ErrNotFound is the error resulting if a path search failed to find an executable file.
// It is an alias for exec.ErrNotFound.
var ErrNotFound = exec.ErrNotFound
// Cmd represents an external command being prepared or run.
// It is an alias for exec.Cmd.
type Cmd = exec.Cmd
// Error is returned by LookPath when it fails to classify a file as an executable.
// It is an alias for exec.Error.
type Error = exec.Error
// An ExitError reports an unsuccessful exit by a command.
// It is an alias for exec.ExitError.
type ExitError = exec.ExitError
func relError(file, path string) error {
return fmt.Errorf("%s resolves to executable in current directory (.%c%s)", file, filepath.Separator, path)
}
// LookPath searches for an executable named file in the directories
// named by the PATH environment variable. If file contains a slash,
// it is tried directly and the PATH is not consulted. The result will be
// an absolute path.
//
// LookPath differs from exec.LookPath in its handling of PATH lookups,
// which are used for file names without slashes. If exec.LookPath's
// PATH lookup would have returned an executable from the current directory,
// LookPath instead returns an error.
func LookPath(file string) (string, error) {
path, err := exec.LookPath(file)
if err != nil {
return "", err
}
if filepath.Base(file) == file && !filepath.IsAbs(path) {
return "", relError(file, path)
}
return path, nil
}
func fixCmd(name string, cmd *exec.Cmd) {
if filepath.Base(name) == name && !filepath.IsAbs(cmd.Path) {
// exec.Command was called with a bare binary name and
// exec.LookPath returned a path which is not absolute.
// Set cmd.lookPathErr and clear cmd.Path so that it
// cannot be run.
lookPathErr := (*error)(unsafe.Pointer(reflect.ValueOf(cmd).Elem().FieldByName("lookPathErr").Addr().Pointer()))
if *lookPathErr == nil {
*lookPathErr = relError(name, cmd.Path)
}
cmd.Path = ""
}
}
// CommandContext is like Command but includes a context.
//
// The provided context is used to kill the process (by calling os.Process.Kill)
// if the context becomes done before the command completes on its own.
func CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd {
cmd := exec.CommandContext(ctx, name, arg...)
fixCmd(name, cmd)
return cmd
}
// Command returns the Cmd struct to execute the named program with the given arguments.
// See exec.Command for most details.
//
// Command differs from exec.Command in its handling of PATH lookups,
// which are used when the program name contains no slashes.
// If exec.Command would have returned an exec.Cmd configured to run an
// executable from the current directory, Command instead
// returns an exec.Cmd that will return an error from Start or Run.
func Command(name string, arg ...string) *exec.Cmd {
cmd := exec.Command(name, arg...)
fixCmd(name, cmd)
return cmd
}
================================================
FILE: _tools/src/golang.org/x/tools/go/ast/astutil/enclosing.go
================================================
// 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 astutil
// This file defines utilities for working with source positions.
import (
"fmt"
"go/ast"
"go/token"
"sort"
)
// PathEnclosingInterval returns the node that encloses the source
// interval [start, end), and all its ancestors up to the AST root.
//
// The definition of "enclosing" used by this function considers
// additional whitespace abutting a node to be enclosed by it.
// In this example:
//
// z := x + y // add them
// <-A->
// <----B----->
//
// the ast.BinaryExpr(+) node is considered to enclose interval B
// even though its [Pos()..End()) is actually only interval A.
// This behaviour makes user interfaces more tolerant of imperfect
// input.
//
// This function treats tokens as nodes, though they are not included
// in the result. e.g. PathEnclosingInterval("+") returns the
// enclosing ast.BinaryExpr("x + y").
//
// If start==end, the 1-char interval following start is used instead.
//
// The 'exact' result is true if the interval contains only path[0]
// and perhaps some adjacent whitespace. It is false if the interval
// overlaps multiple children of path[0], or if it contains only
// interior whitespace of path[0].
// In this example:
//
// z := x + y // add them
// <--C--> <---E-->
// ^
// D
//
// intervals C, D and E are inexact. C is contained by the
// z-assignment statement, because it spans three of its children (:=,
// x, +). So too is the 1-char interval D, because it contains only
// interior whitespace of the assignment. E is considered interior
// whitespace of the BlockStmt containing the assignment.
//
// Precondition: [start, end) both lie within the same file as root.
// TODO(adonovan): return (nil, false) in this case and remove precond.
// Requires FileSet; see loader.tokenFileContainsPos.
//
// Postcondition: path is never nil; it always contains at least 'root'.
//
func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Node, exact bool) {
// fmt.Printf("EnclosingInterval %d %d\n", start, end) // debugging
// Precondition: node.[Pos..End) and adjoining whitespace contain [start, end).
var visit func(node ast.Node) bool
visit = func(node ast.Node) bool {
path = append(path, node)
nodePos := node.Pos()
nodeEnd := node.End()
// fmt.Printf("visit(%T, %d, %d)\n", node, nodePos, nodeEnd) // debugging
// Intersect [start, end) with interval of node.
if start < nodePos {
start = nodePos
}
if end > nodeEnd {
end = nodeEnd
}
// Find sole child that contains [start, end).
children := childrenOf(node)
l := len(children)
for i, child := range children {
// [childPos, childEnd) is unaugmented interval of child.
childPos := child.Pos()
childEnd := child.End()
// [augPos, augEnd) is whitespace-augmented interval of child.
augPos := childPos
augEnd := childEnd
if i > 0 {
augPos = children[i-1].End() // start of preceding whitespace
}
if i < l-1 {
nextChildPos := children[i+1].Pos()
// Does [start, end) lie between child and next child?
if start >= augEnd && end <= nextChildPos {
return false // inexact match
}
augEnd = nextChildPos // end of following whitespace
}
// fmt.Printf("\tchild %d: [%d..%d)\tcontains interval [%d..%d)?\n",
// i, augPos, augEnd, start, end) // debugging
// Does augmented child strictly contain [start, end)?
if augPos <= start && end <= augEnd {
_, isToken := child.(tokenNode)
return isToken || visit(child)
}
// Does [start, end) overlap multiple children?
// i.e. left-augmented child contains start
// but LR-augmented child does not contain end.
if start < childEnd && end > augEnd {
break
}
}
// No single child contained [start, end),
// so node is the result. Is it exact?
// (It's tempting to put this condition before the
// child loop, but it gives the wrong result in the
// case where a node (e.g. ExprStmt) and its sole
// child have equal intervals.)
if start == nodePos && end == nodeEnd {
return true // exact match
}
return false // inexact: overlaps multiple children
}
if start > end {
start, end = end, start
}
if start < root.End() && end > root.Pos() {
if start == end {
end = start + 1 // empty interval => interval of size 1
}
exact = visit(root)
// Reverse the path:
for i, l := 0, len(path); i < l/2; i++ {
path[i], path[l-1-i] = path[l-1-i], path[i]
}
} else {
// Selection lies within whitespace preceding the
// first (or following the last) declaration in the file.
// The result nonetheless always includes the ast.File.
path = append(path, root)
}
return
}
// tokenNode is a dummy implementation of ast.Node for a single token.
// They are used transiently by PathEnclosingInterval but never escape
// this package.
//
type tokenNode struct {
pos token.Pos
end token.Pos
}
func (n tokenNode) Pos() token.Pos {
return n.pos
}
func (n tokenNode) End() token.Pos {
return n.end
}
func tok(pos token.Pos, len int) ast.Node {
return tokenNode{pos, pos + token.Pos(len)}
}
// childrenOf returns the direct non-nil children of ast.Node n.
// It may include fake ast.Node implementations for bare tokens.
// it is not safe to call (e.g.) ast.Walk on such nodes.
//
func childrenOf(n ast.Node) []ast.Node {
var children []ast.Node
// First add nodes for all true subtrees.
ast.Inspect(n, func(node ast.Node) bool {
if node == n { // push n
return true // recur
}
if node != nil { // push child
children = append(children, node)
}
return false // no recursion
})
// Then add fake Nodes for bare tokens.
switch n := n.(type) {
case *ast.ArrayType:
children = append(children,
tok(n.Lbrack, len("[")),
tok(n.Elt.End(), len("]")))
case *ast.AssignStmt:
children = append(children,
tok(n.TokPos, len(n.Tok.String())))
case *ast.BasicLit:
children = append(children,
tok(n.ValuePos, len(n.Value)))
case *ast.BinaryExpr:
children = append(children, tok(n.OpPos, len(n.Op.String())))
case *ast.BlockStmt:
children = append(children,
tok(n.Lbrace, len("{")),
tok(n.Rbrace, len("}")))
case *ast.BranchStmt:
children = append(children,
tok(n.TokPos, len(n.Tok.String())))
case *ast.CallExpr:
children = append(children,
tok(n.Lparen, len("(")),
tok(n.Rparen, len(")")))
if n.Ellipsis != 0 {
children = append(children, tok(n.Ellipsis, len("...")))
}
case *ast.CaseClause:
if n.List == nil {
children = append(children,
tok(n.Case, len("default")))
} else {
children = append(children,
tok(n.Case, len("case")))
}
children = append(children, tok(n.Colon, len(":")))
case *ast.ChanType:
switch n.Dir {
case ast.RECV:
children = append(children, tok(n.Begin, len("<-chan")))
case ast.SEND:
children = append(children, tok(n.Begin, len("chan<-")))
case ast.RECV | ast.SEND:
children = append(children, tok(n.Begin, len("chan")))
}
case *ast.CommClause:
if n.Comm == nil {
children = append(children,
tok(n.Case, len("default")))
} else {
children = append(children,
tok(n.Case, len("case")))
}
children = append(children, tok(n.Colon, len(":")))
case *ast.Comment:
// nop
case *ast.CommentGroup:
// nop
case *ast.CompositeLit:
children = append(children,
tok(n.Lbrace, len("{")),
tok(n.Rbrace, len("{")))
case *ast.DeclStmt:
// nop
case *ast.DeferStmt:
children = append(children,
tok(n.Defer, len("defer")))
case *ast.Ellipsis:
children = append(children,
tok(n.Ellipsis, len("...")))
case *ast.EmptyStmt:
// nop
case *ast.ExprStmt:
// nop
case *ast.Field:
// TODO(adonovan): Field.{Doc,Comment,Tag}?
case *ast.FieldList:
children = append(children,
tok(n.Opening, len("(")),
tok(n.Closing, len(")")))
case *ast.File:
// TODO test: Doc
children = append(children,
tok(n.Package, len("package")))
case *ast.ForStmt:
children = append(children,
tok(n.For, len("for")))
case *ast.FuncDecl:
// TODO(adonovan): FuncDecl.Comment?
// Uniquely, FuncDecl breaks the invariant that
// preorder traversal yields tokens in lexical order:
// in fact, FuncDecl.Recv precedes FuncDecl.Type.Func.
//
// As a workaround, we inline the case for FuncType
// here and order things correctly.
//
children = nil // discard ast.Walk(FuncDecl) info subtrees
children = append(children, tok(n.Type.Func, len("func")))
if n.Recv != nil {
children = append(children, n.Recv)
}
children = append(children, n.Name)
if n.Type.Params != nil {
children = append(children, n.Type.Params)
}
if n.Type.Results != nil {
children = append(children, n.Type.Results)
}
if n.Body != nil {
children = append(children, n.Body)
}
case *ast.FuncLit:
// nop
case *ast.FuncType:
if n.Func != 0 {
children = append(children,
tok(n.Func, len("func")))
}
case *ast.GenDecl:
children = append(children,
tok(n.TokPos, len(n.Tok.String())))
if n.Lparen != 0 {
children = append(children,
tok(n.Lparen, len("(")),
tok(n.Rparen, len(")")))
}
case *ast.GoStmt:
children = append(children,
tok(n.Go, len("go")))
case *ast.Ident:
children = append(children,
tok(n.NamePos, len(n.Name)))
case *ast.IfStmt:
children = append(children,
tok(n.If, len("if")))
case *ast.ImportSpec:
// TODO(adonovan): ImportSpec.{Doc,EndPos}?
case *ast.IncDecStmt:
children = append(children,
tok(n.TokPos, len(n.Tok.String())))
case *ast.IndexExpr:
children = append(children,
tok(n.Lbrack, len("{")),
tok(n.Rbrack, len("}")))
case *ast.InterfaceType:
children = append(children,
tok(n.Interface, len("interface")))
case *ast.KeyValueExpr:
children = append(children,
tok(n.Colon, len(":")))
case *ast.LabeledStmt:
children = append(children,
tok(n.Colon, len(":")))
case *ast.MapType:
children = append(children,
tok(n.Map, len("map")))
case *ast.ParenExpr:
children = append(children,
tok(n.Lparen, len("(")),
tok(n.Rparen, len(")")))
case *ast.RangeStmt:
children = append(children,
tok(n.For, len("for")),
tok(n.TokPos, len(n.Tok.String())))
case *ast.ReturnStmt:
children = append(children,
tok(n.Return, len("return")))
case *ast.SelectStmt:
children = append(children,
tok(n.Select, len("select")))
case *ast.SelectorExpr:
// nop
case *ast.SendStmt:
children = append(children,
tok(n.Arrow, len("<-")))
case *ast.SliceExpr:
children = append(children,
tok(n.Lbrack, len("[")),
tok(n.Rbrack, len("]")))
case *ast.StarExpr:
children = append(children, tok(n.Star, len("*")))
case *ast.StructType:
children = append(children, tok(n.Struct, len("struct")))
case *ast.SwitchStmt:
children = append(children, tok(n.Switch, len("switch")))
case *ast.TypeAssertExpr:
children = append(children,
tok(n.Lparen-1, len(".")),
tok(n.Lparen, len("(")),
tok(n.Rparen, len(")")))
case *ast.TypeSpec:
// TODO(adonovan): TypeSpec.{Doc,Comment}?
case *ast.TypeSwitchStmt:
children = append(children, tok(n.Switch, len("switch")))
case *ast.UnaryExpr:
children = append(children, tok(n.OpPos, len(n.Op.String())))
case *ast.ValueSpec:
// TODO(adonovan): ValueSpec.{Doc,Comment}?
case *ast.BadDecl, *ast.BadExpr, *ast.BadStmt:
// nop
}
// TODO(adonovan): opt: merge the logic of ast.Inspect() into
// the switch above so we can make interleaved callbacks for
// both Nodes and Tokens in the right order and avoid the need
// to sort.
sort.Sort(byPos(children))
return children
}
type byPos []ast.Node
func (sl byPos) Len() int {
return len(sl)
}
func (sl byPos) Less(i, j int) bool {
return sl[i].Pos() < sl[j].Pos()
}
func (sl byPos) Swap(i, j int) {
sl[i], sl[j] = sl[j], sl[i]
}
// NodeDescription returns a description of the concrete type of n suitable
// for a user interface.
//
// TODO(adonovan): in
gitextract_m5s28tuc/
├── .github/
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── commit-checks.yml
│ └── stale.yaml
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── Gopkg.toml
├── LICENSE
├── Makefile
├── NOTICE
├── PROTOCOL.md
├── README.md
├── THIRD_PARTY
├── _tools/
│ ├── .gitignore
│ └── src/
│ ├── github.com/
│ │ ├── kisielk/
│ │ │ ├── errcheck/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── internal/
│ │ │ │ │ └── errcheck/
│ │ │ │ │ └── errcheck.go
│ │ │ │ └── main.go
│ │ │ └── gotool/
│ │ │ ├── LEGAL
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── go13.go
│ │ │ ├── go14-15.go
│ │ │ ├── go16-18.go
│ │ │ ├── internal/
│ │ │ │ └── load/
│ │ │ │ ├── path.go
│ │ │ │ ├── pkg.go
│ │ │ │ └── search.go
│ │ │ ├── match.go
│ │ │ ├── match18.go
│ │ │ └── tool.go
│ │ └── twitchtv/
│ │ └── retool/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── add.go
│ │ ├── build.go
│ │ ├── clean.go
│ │ ├── do.go
│ │ ├── input.go
│ │ ├── main.go
│ │ ├── manifest.go
│ │ ├── print.go
│ │ ├── remove.go
│ │ ├── spec.go
│ │ ├── sync.go
│ │ ├── tool.go
│ │ ├── tooldir.go
│ │ ├── upgrade.go
│ │ └── vendor/
│ │ └── github.com/
│ │ ├── Masterminds/
│ │ │ └── semver/
│ │ │ ├── LICENSE.txt
│ │ │ ├── README.md
│ │ │ ├── collection.go
│ │ │ ├── constraints.go
│ │ │ ├── doc.go
│ │ │ └── version.go
│ │ └── pkg/
│ │ └── errors/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── errors.go
│ │ └── stack.go
│ ├── golang.org/
│ │ └── x/
│ │ ├── sys/
│ │ │ └── execabs/
│ │ │ └── execabs.go
│ │ └── tools/
│ │ └── go/
│ │ ├── ast/
│ │ │ └── astutil/
│ │ │ ├── enclosing.go
│ │ │ ├── imports.go
│ │ │ ├── rewrite.go
│ │ │ └── util.go
│ │ ├── buildutil/
│ │ │ ├── allpackages.go
│ │ │ ├── fakecontext.go
│ │ │ ├── overlay.go
│ │ │ ├── tags.go
│ │ │ └── util.go
│ │ ├── internal/
│ │ │ └── cgo/
│ │ │ ├── cgo.go
│ │ │ └── cgo_pkgconfig.go
│ │ └── loader/
│ │ ├── doc.go
│ │ ├── loader.go
│ │ └── util.go
│ └── google.golang.org/
│ └── protobuf/
│ ├── cmd/
│ │ └── protoc-gen-go/
│ │ ├── internal_gengo/
│ │ │ ├── init.go
│ │ │ ├── main.go
│ │ │ ├── reflect.go
│ │ │ └── well_known_types.go
│ │ └── main.go
│ ├── compiler/
│ │ └── protogen/
│ │ └── protogen.go
│ ├── encoding/
│ │ ├── prototext/
│ │ │ ├── decode.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ │ └── protowire/
│ │ └── wire.go
│ ├── internal/
│ │ ├── descfmt/
│ │ │ └── stringer.go
│ │ ├── descopts/
│ │ │ └── options.go
│ │ ├── detrand/
│ │ │ └── rand.go
│ │ ├── encoding/
│ │ │ ├── defval/
│ │ │ │ └── default.go
│ │ │ ├── messageset/
│ │ │ │ └── messageset.go
│ │ │ ├── tag/
│ │ │ │ └── tag.go
│ │ │ └── text/
│ │ │ ├── decode.go
│ │ │ ├── decode_number.go
│ │ │ ├── decode_string.go
│ │ │ ├── decode_token.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ │ ├── errors/
│ │ │ ├── errors.go
│ │ │ ├── is_go112.go
│ │ │ └── is_go113.go
│ │ ├── filedesc/
│ │ │ ├── build.go
│ │ │ ├── desc.go
│ │ │ ├── desc_init.go
│ │ │ ├── desc_lazy.go
│ │ │ ├── desc_list.go
│ │ │ ├── desc_list_gen.go
│ │ │ └── placeholder.go
│ │ ├── filetype/
│ │ │ └── build.go
│ │ ├── flags/
│ │ │ ├── flags.go
│ │ │ ├── proto_legacy_disable.go
│ │ │ └── proto_legacy_enable.go
│ │ ├── genid/
│ │ │ ├── any_gen.go
│ │ │ ├── api_gen.go
│ │ │ ├── descriptor_gen.go
│ │ │ ├── doc.go
│ │ │ ├── duration_gen.go
│ │ │ ├── empty_gen.go
│ │ │ ├── field_mask_gen.go
│ │ │ ├── goname.go
│ │ │ ├── map_entry.go
│ │ │ ├── source_context_gen.go
│ │ │ ├── struct_gen.go
│ │ │ ├── timestamp_gen.go
│ │ │ ├── type_gen.go
│ │ │ ├── wrappers.go
│ │ │ └── wrappers_gen.go
│ │ ├── impl/
│ │ │ ├── api_export.go
│ │ │ ├── checkinit.go
│ │ │ ├── codec_extension.go
│ │ │ ├── codec_field.go
│ │ │ ├── codec_gen.go
│ │ │ ├── codec_map.go
│ │ │ ├── codec_map_go111.go
│ │ │ ├── codec_map_go112.go
│ │ │ ├── codec_message.go
│ │ │ ├── codec_messageset.go
│ │ │ ├── codec_reflect.go
│ │ │ ├── codec_tables.go
│ │ │ ├── codec_unsafe.go
│ │ │ ├── convert.go
│ │ │ ├── convert_list.go
│ │ │ ├── convert_map.go
│ │ │ ├── decode.go
│ │ │ ├── encode.go
│ │ │ ├── enum.go
│ │ │ ├── extension.go
│ │ │ ├── legacy_enum.go
│ │ │ ├── legacy_export.go
│ │ │ ├── legacy_extension.go
│ │ │ ├── legacy_file.go
│ │ │ ├── legacy_message.go
│ │ │ ├── merge.go
│ │ │ ├── merge_gen.go
│ │ │ ├── message.go
│ │ │ ├── message_reflect.go
│ │ │ ├── message_reflect_field.go
│ │ │ ├── message_reflect_gen.go
│ │ │ ├── pointer_reflect.go
│ │ │ ├── pointer_unsafe.go
│ │ │ ├── validate.go
│ │ │ └── weak.go
│ │ ├── order/
│ │ │ ├── order.go
│ │ │ └── range.go
│ │ ├── pragma/
│ │ │ └── pragma.go
│ │ ├── set/
│ │ │ └── ints.go
│ │ ├── strs/
│ │ │ ├── strings.go
│ │ │ ├── strings_pure.go
│ │ │ └── strings_unsafe.go
│ │ └── version/
│ │ └── version.go
│ ├── proto/
│ │ ├── checkinit.go
│ │ ├── decode.go
│ │ ├── decode_gen.go
│ │ ├── doc.go
│ │ ├── encode.go
│ │ ├── encode_gen.go
│ │ ├── equal.go
│ │ ├── extension.go
│ │ ├── merge.go
│ │ ├── messageset.go
│ │ ├── proto.go
│ │ ├── proto_methods.go
│ │ ├── proto_reflect.go
│ │ ├── reset.go
│ │ ├── size.go
│ │ ├── size_gen.go
│ │ └── wrappers.go
│ ├── reflect/
│ │ ├── protodesc/
│ │ │ ├── desc.go
│ │ │ ├── desc_init.go
│ │ │ ├── desc_resolve.go
│ │ │ ├── desc_validate.go
│ │ │ └── proto.go
│ │ ├── protoreflect/
│ │ │ ├── methods.go
│ │ │ ├── proto.go
│ │ │ ├── source.go
│ │ │ ├── source_gen.go
│ │ │ ├── type.go
│ │ │ ├── value.go
│ │ │ ├── value_pure.go
│ │ │ ├── value_union.go
│ │ │ └── value_unsafe.go
│ │ └── protoregistry/
│ │ └── registry.go
│ ├── runtime/
│ │ ├── protoiface/
│ │ │ ├── legacy.go
│ │ │ └── methods.go
│ │ └── protoimpl/
│ │ ├── impl.go
│ │ └── version.go
│ └── types/
│ ├── descriptorpb/
│ │ └── descriptor.pb.go
│ └── pluginpb/
│ └── plugin.pb.go
├── check_protoc_version.sh
├── client_options.go
├── client_options_test.go
├── clientcompat/
│ ├── README.md
│ ├── clientcompat.go
│ ├── clientcompat.proto
│ ├── gen.go
│ ├── gocompat/
│ │ └── gocompat.go
│ ├── internal/
│ │ └── clientcompat/
│ │ ├── clientcompat.pb.go
│ │ └── clientcompat.twirp.go
│ ├── main.go
│ └── run.go
├── context.go
├── ctxsetters/
│ └── ctxsetters.go
├── docs/
│ ├── best_practices.md
│ ├── command_line.md
│ ├── curl.md
│ ├── errors.md
│ ├── example.md
│ ├── headers.md
│ ├── hooks.md
│ ├── install.md
│ ├── intro.md
│ ├── migrate_to_twirp.md
│ ├── mux.md
│ ├── protobuf_and_json.md
│ ├── routing.md
│ ├── spec_v5.md
│ ├── spec_v6.md
│ ├── spec_v7.md
│ └── version_matrix.md
├── errors.go
├── errors_test.go
├── example/
│ ├── cmd/
│ │ ├── client/
│ │ │ └── main.go
│ │ └── server/
│ │ ├── README.md
│ │ ├── main.go
│ │ └── statter.go
│ ├── gen.go
│ ├── service.pb.go
│ ├── service.proto
│ └── service.twirp.go
├── hooks/
│ └── statsd/
│ ├── statsd.go
│ └── statsd_test.go
├── interceptors.go
├── interceptors_test.go
├── internal/
│ ├── contextkeys/
│ │ └── keys.go
│ ├── descriptors/
│ │ └── descriptors.go
│ ├── gen/
│ │ ├── logging.go
│ │ ├── main.go
│ │ ├── stringutils/
│ │ │ └── stringutils.go
│ │ ├── typemap/
│ │ │ ├── testdata/
│ │ │ │ ├── fileset.pb
│ │ │ │ ├── gen.go
│ │ │ │ ├── importer.proto
│ │ │ │ ├── public_importer.proto
│ │ │ │ ├── public_reimporter.proto
│ │ │ │ ├── root_pkg.proto
│ │ │ │ └── service.proto
│ │ │ ├── typemap.go
│ │ │ └── typemap_test.go
│ │ ├── version.go
│ │ └── wrappers.go
│ └── twirptest/
│ ├── client_1_13_test.go
│ ├── client_test.go
│ ├── empty_service/
│ │ ├── compile_test.go
│ │ ├── empty_service.pb.go
│ │ ├── empty_service.proto
│ │ ├── empty_service.twirp.go
│ │ └── gen.go
│ ├── gen.go
│ ├── google_protobuf_imports/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── service.pb.go
│ │ ├── service.proto
│ │ └── service.twirp.go
│ ├── hatmakers.go
│ ├── importable/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── importable.pb.go
│ │ ├── importable.proto
│ │ └── importable.twirp.go
│ ├── importer/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── importer.pb.go
│ │ ├── importer.proto
│ │ └── importer.twirp.go
│ ├── importer_local/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── importer_local.pb.go
│ │ ├── importer_local.proto
│ │ ├── importer_local.twirp.go
│ │ ├── importer_local_msgdef.pb.go
│ │ └── importer_local_msgdef.proto
│ ├── importmapping/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── gen.sh
│ │ ├── protoc_gen-x.sh
│ │ ├── x/
│ │ │ ├── x.pb.go
│ │ │ ├── x.proto
│ │ │ └── x.twirp.go
│ │ └── y/
│ │ ├── y.pb.go
│ │ └── y.proto
│ ├── json_serialization/
│ │ ├── gen.go
│ │ ├── json_serialization.pb.go
│ │ ├── json_serialization.proto
│ │ ├── json_serialization.twirp.go
│ │ └── json_serialization_test.go
│ ├── multiple/
│ │ ├── gen.go
│ │ ├── multiple1.pb.go
│ │ ├── multiple1.proto
│ │ ├── multiple1.twirp.go
│ │ ├── multiple2.pb.go
│ │ ├── multiple2.proto
│ │ ├── multiple2.twirp.go
│ │ └── multiple_test.go
│ ├── no_package_name/
│ │ ├── gen.go
│ │ ├── no_package_name.pb.go
│ │ ├── no_package_name.proto
│ │ └── no_package_name.twirp.go
│ ├── no_package_name_importer/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── no_package_name_importer.pb.go
│ │ ├── no_package_name_importer.proto
│ │ └── no_package_name_importer.twirp.go
│ ├── service.pb.go
│ ├── service.proto
│ ├── service.twirp.go
│ ├── service_method_same_name/
│ │ ├── compile_test.go
│ │ ├── gen.go
│ │ ├── service_method_same_name.pb.go
│ │ ├── service_method_same_name.proto
│ │ └── service_method_same_name.twirp.go
│ ├── service_test.go
│ └── snake_case_names/
│ ├── compatibility_test.go
│ ├── compile_test.go
│ ├── gen.go
│ ├── snake_case_names.pb.go
│ ├── snake_case_names.proto
│ └── snake_case_names.twirp.go
├── license_test.go
├── protoc-gen-twirp/
│ ├── command_line.go
│ ├── command_line_test.go
│ ├── generator.go
│ ├── generator_test.go
│ ├── go_naming.go
│ ├── go_naming_test.go
│ └── main.go
├── server_options.go
├── server_options_test.go
├── tools.json
├── vendor/
│ ├── github.com/
│ │ ├── davecgh/
│ │ │ └── go-spew/
│ │ │ ├── LICENSE
│ │ │ └── spew/
│ │ │ ├── bypass.go
│ │ │ ├── bypasssafe.go
│ │ │ ├── common.go
│ │ │ ├── config.go
│ │ │ ├── doc.go
│ │ │ ├── dump.go
│ │ │ ├── format.go
│ │ │ └── spew.go
│ │ ├── pkg/
│ │ │ └── errors/
│ │ │ ├── LICENSE
│ │ │ ├── errors.go
│ │ │ └── stack.go
│ │ ├── pmezard/
│ │ │ └── go-difflib/
│ │ │ ├── LICENSE
│ │ │ └── difflib/
│ │ │ └── difflib.go
│ │ └── stretchr/
│ │ └── testify/
│ │ ├── LICENSE
│ │ ├── assert/
│ │ │ ├── assertion_format.go
│ │ │ ├── assertion_forward.go
│ │ │ ├── assertions.go
│ │ │ ├── doc.go
│ │ │ ├── errors.go
│ │ │ ├── forward_assertions.go
│ │ │ └── http_assertions.go
│ │ └── require/
│ │ ├── doc.go
│ │ ├── forward_requirements.go
│ │ ├── require.go
│ │ ├── require_forward.go
│ │ └── requirements.go
│ └── google.golang.org/
│ └── protobuf/
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── encoding/
│ │ ├── protojson/
│ │ │ ├── decode.go
│ │ │ ├── doc.go
│ │ │ ├── encode.go
│ │ │ └── well_known_types.go
│ │ ├── prototext/
│ │ │ ├── decode.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ │ └── protowire/
│ │ └── wire.go
│ ├── internal/
│ │ ├── descfmt/
│ │ │ └── stringer.go
│ │ ├── descopts/
│ │ │ └── options.go
│ │ ├── detrand/
│ │ │ └── rand.go
│ │ ├── encoding/
│ │ │ ├── defval/
│ │ │ │ └── default.go
│ │ │ ├── json/
│ │ │ │ ├── decode.go
│ │ │ │ ├── decode_number.go
│ │ │ │ ├── decode_string.go
│ │ │ │ ├── decode_token.go
│ │ │ │ └── encode.go
│ │ │ ├── messageset/
│ │ │ │ └── messageset.go
│ │ │ ├── tag/
│ │ │ │ └── tag.go
│ │ │ └── text/
│ │ │ ├── decode.go
│ │ │ ├── decode_number.go
│ │ │ ├── decode_string.go
│ │ │ ├── decode_token.go
│ │ │ ├── doc.go
│ │ │ └── encode.go
│ │ ├── errors/
│ │ │ ├── errors.go
│ │ │ ├── is_go112.go
│ │ │ └── is_go113.go
│ │ ├── filedesc/
│ │ │ ├── build.go
│ │ │ ├── desc.go
│ │ │ ├── desc_init.go
│ │ │ ├── desc_lazy.go
│ │ │ ├── desc_list.go
│ │ │ ├── desc_list_gen.go
│ │ │ └── placeholder.go
│ │ ├── filetype/
│ │ │ └── build.go
│ │ ├── flags/
│ │ │ ├── flags.go
│ │ │ ├── proto_legacy_disable.go
│ │ │ └── proto_legacy_enable.go
│ │ ├── genid/
│ │ │ ├── any_gen.go
│ │ │ ├── api_gen.go
│ │ │ ├── descriptor_gen.go
│ │ │ ├── doc.go
│ │ │ ├── duration_gen.go
│ │ │ ├── empty_gen.go
│ │ │ ├── field_mask_gen.go
│ │ │ ├── goname.go
│ │ │ ├── map_entry.go
│ │ │ ├── source_context_gen.go
│ │ │ ├── struct_gen.go
│ │ │ ├── timestamp_gen.go
│ │ │ ├── type_gen.go
│ │ │ ├── wrappers.go
│ │ │ └── wrappers_gen.go
│ │ ├── impl/
│ │ │ ├── api_export.go
│ │ │ ├── checkinit.go
│ │ │ ├── codec_extension.go
│ │ │ ├── codec_field.go
│ │ │ ├── codec_gen.go
│ │ │ ├── codec_map.go
│ │ │ ├── codec_map_go111.go
│ │ │ ├── codec_map_go112.go
│ │ │ ├── codec_message.go
│ │ │ ├── codec_messageset.go
│ │ │ ├── codec_reflect.go
│ │ │ ├── codec_tables.go
│ │ │ ├── codec_unsafe.go
│ │ │ ├── convert.go
│ │ │ ├── convert_list.go
│ │ │ ├── convert_map.go
│ │ │ ├── decode.go
│ │ │ ├── encode.go
│ │ │ ├── enum.go
│ │ │ ├── extension.go
│ │ │ ├── legacy_enum.go
│ │ │ ├── legacy_export.go
│ │ │ ├── legacy_extension.go
│ │ │ ├── legacy_file.go
│ │ │ ├── legacy_message.go
│ │ │ ├── merge.go
│ │ │ ├── merge_gen.go
│ │ │ ├── message.go
│ │ │ ├── message_reflect.go
│ │ │ ├── message_reflect_field.go
│ │ │ ├── message_reflect_gen.go
│ │ │ ├── pointer_reflect.go
│ │ │ ├── pointer_unsafe.go
│ │ │ ├── validate.go
│ │ │ └── weak.go
│ │ ├── order/
│ │ │ ├── order.go
│ │ │ └── range.go
│ │ ├── pragma/
│ │ │ └── pragma.go
│ │ ├── set/
│ │ │ └── ints.go
│ │ ├── strs/
│ │ │ ├── strings.go
│ │ │ ├── strings_pure.go
│ │ │ └── strings_unsafe.go
│ │ └── version/
│ │ └── version.go
│ ├── proto/
│ │ ├── checkinit.go
│ │ ├── decode.go
│ │ ├── decode_gen.go
│ │ ├── doc.go
│ │ ├── encode.go
│ │ ├── encode_gen.go
│ │ ├── equal.go
│ │ ├── extension.go
│ │ ├── merge.go
│ │ ├── messageset.go
│ │ ├── proto.go
│ │ ├── proto_methods.go
│ │ ├── proto_reflect.go
│ │ ├── reset.go
│ │ ├── size.go
│ │ ├── size_gen.go
│ │ └── wrappers.go
│ ├── reflect/
│ │ ├── protoreflect/
│ │ │ ├── methods.go
│ │ │ ├── proto.go
│ │ │ ├── source.go
│ │ │ ├── source_gen.go
│ │ │ ├── type.go
│ │ │ ├── value.go
│ │ │ ├── value_pure.go
│ │ │ ├── value_union.go
│ │ │ └── value_unsafe.go
│ │ └── protoregistry/
│ │ └── registry.go
│ ├── runtime/
│ │ ├── protoiface/
│ │ │ ├── legacy.go
│ │ │ └── methods.go
│ │ └── protoimpl/
│ │ ├── impl.go
│ │ └── version.go
│ └── types/
│ ├── descriptorpb/
│ │ └── descriptor.pb.go
│ ├── known/
│ │ ├── emptypb/
│ │ │ └── empty.pb.go
│ │ └── wrapperspb/
│ │ └── wrappers.pb.go
│ └── pluginpb/
│ └── plugin.pb.go
├── vendor_test.go
├── version_constant.go
└── website/
├── .gitignore
├── core/
│ └── Footer.js
├── i18n/
│ └── en.json
├── package.json
├── pages/
│ └── en/
│ ├── help.js
│ ├── index.js
│ └── users.js
├── sidebars.json
├── siteConfig.js
└── static/
├── .well-known/
│ └── assetlinks.json
└── css/
└── custom.css
Showing preview only (958K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (9500 symbols across 406 files)
FILE: _tools/src/github.com/kisielk/errcheck/internal/errcheck/errcheck.go
function init (line 25) | func init() {
type UncheckedError (line 36) | type UncheckedError struct
type UncheckedErrors (line 44) | type UncheckedErrors struct
method Append (line 52) | func (e *UncheckedErrors) Append(errors ...UncheckedError) {
method Error (line 58) | func (e *UncheckedErrors) Error() string {
method Len (line 63) | func (e *UncheckedErrors) Len() int { return len(e.Errors) }
method Swap (line 66) | func (e *UncheckedErrors) Swap(i, j int) { e.Errors[i], e.Errors[j] = ...
type byName (line 68) | type byName struct
method Less (line 71) | func (e byName) Less(i, j int) bool {
type Checker (line 89) | type Checker struct
method SetExclude (line 119) | func (c *Checker) SetExclude(l map[string]bool) {
method logf (line 135) | func (c *Checker) logf(msg string, args ...interface{}) {
method load (line 141) | func (c *Checker) load(paths ...string) (*loader.Program, error) {
method CheckPackages (line 161) | func (c *Checker) CheckPackages(paths ...string) error {
function NewChecker (line 113) | func NewChecker() *Checker {
type visitor (line 207) | type visitor struct
method excludeCall (line 219) | func (v *visitor) excludeCall(call *ast.CallExpr) bool {
method ignoreCall (line 240) | func (v *visitor) ignoreCall(call *ast.CallExpr) bool {
method errorsByArg (line 301) | func (v *visitor) errorsByArg(call *ast.CallExpr) []bool {
method callReturnsError (line 329) | func (v *visitor) callReturnsError(call *ast.CallExpr) bool {
method isRecover (line 342) | func (v *visitor) isRecover(call *ast.CallExpr) bool {
method addErrorAtPosition (line 351) | func (v *visitor) addErrorAtPosition(position token.Pos) {
method Visit (line 380) | func (v *visitor) Visit(node ast.Node) ast.Visitor {
function nonVendoredPkgPath (line 290) | func nonVendoredPkgPath(pkgPath string) (string, bool) {
function readfile (line 366) | func readfile(filename string) []string {
function isErrorType (line 465) | func isErrorType(t types.Type) bool {
FILE: _tools/src/github.com/kisielk/errcheck/main.go
constant exitCodeOk (line 18) | exitCodeOk int = iota
constant exitUncheckedError (line 19) | exitUncheckedError
constant exitFatalError (line 20) | exitFatalError
type ignoreFlag (line 25) | type ignoreFlag
method String (line 27) | func (f ignoreFlag) String() string {
method Set (line 39) | func (f ignoreFlag) Set(s string) error {
type tagsFlag (line 62) | type tagsFlag
method String (line 64) | func (f *tagsFlag) String() string {
method Set (line 68) | func (f *tagsFlag) Set(s string) error {
function reportUncheckedErrors (line 86) | func reportUncheckedErrors(e *errcheck.UncheckedErrors) {
function mainCmd (line 103) | func mainCmd(args []string) int {
function parseFlags (line 126) | func parseFlags(checker *errcheck.Checker, args []string) ([]string, int) {
function main (line 181) | func main() {
FILE: _tools/src/github.com/kisielk/gotool/go13.go
function shouldIgnoreImport (line 13) | func shouldIgnoreImport(p *build.Package) bool {
FILE: _tools/src/github.com/kisielk/gotool/go14-15.go
function shouldIgnoreImport (line 13) | func shouldIgnoreImport(p *build.Package) bool {
FILE: _tools/src/github.com/kisielk/gotool/go16-18.go
function shouldIgnoreImport (line 13) | func shouldIgnoreImport(p *build.Package) bool {
FILE: _tools/src/github.com/kisielk/gotool/internal/load/path.go
function hasPathPrefix (line 15) | func hasPathPrefix(s, prefix string) bool {
FILE: _tools/src/github.com/kisielk/gotool/internal/load/pkg.go
function isStandardImportPath (line 18) | func isStandardImportPath(path string) bool {
FILE: _tools/src/github.com/kisielk/gotool/internal/load/search.go
type Context (line 25) | type Context struct
method allPackages (line 39) | func (c *Context) allPackages(pattern string) []string {
method allPackagesInFS (line 50) | func (c *Context) allPackagesInFS(pattern string) []string {
method MatchPackages (line 60) | func (c *Context) MatchPackages(pattern string) []string {
method MatchPackagesInFS (line 151) | func (c *Context) MatchPackagesInFS(pattern string) []string {
method ImportPaths (line 301) | func (c *Context) ImportPaths(args []string) []string {
method ImportPathsNoDotExpansion (line 320) | func (c *Context) ImportPathsNoDotExpansion(args []string) []string {
function treeCanMatchPattern (line 219) | func treeCanMatchPattern(pattern string) func(name string) bool {
function matchPattern (line 246) | func matchPattern(pattern string) func(name string) bool {
function replaceVendor (line 287) | func replaceVendor(x, repl string) string {
function IsMetaPackage (line 352) | func IsMetaPackage(name string) bool {
FILE: _tools/src/github.com/kisielk/gotool/match.go
method importPaths (line 40) | func (c *Context) importPaths(args []string) []string {
method joinPath (line 51) | func (c *Context) joinPath(elem ...string) string {
FILE: _tools/src/github.com/kisielk/gotool/match18.go
function matchPattern (line 50) | func matchPattern(pattern string) func(name string) bool {
method matchPackages (line 63) | func (c *Context) matchPackages(pattern string) []string {
method importPathsNoDotExpansion (line 130) | func (c *Context) importPathsNoDotExpansion(args []string) []string {
method importPaths (line 162) | func (c *Context) importPaths(args []string) []string {
method allPackages (line 183) | func (c *Context) allPackages(pattern string) []string {
method allPackagesInFS (line 194) | func (c *Context) allPackagesInFS(pattern string) []string {
method matchPackagesInFS (line 205) | func (c *Context) matchPackagesInFS(pattern string) []string {
function isMetaPackage (line 271) | func isMetaPackage(name string) bool {
function isStandardImportPath (line 279) | func isStandardImportPath(path string) bool {
function hasPathPrefix (line 290) | func hasPathPrefix(s, prefix string) bool {
function treeCanMatchPattern (line 307) | func treeCanMatchPattern(pattern string) func(name string) bool {
FILE: _tools/src/github.com/kisielk/gotool/tool.go
type Context (line 16) | type Context struct
method ImportPaths (line 31) | func (c *Context) ImportPaths(args []string) []string {
function ImportPaths (line 46) | func ImportPaths(args []string) []string {
FILE: _tools/src/github.com/twitchtv/retool/add.go
method add (line 3) | func (s spec) add(t *tool) {
FILE: _tools/src/github.com/twitchtv/retool/build.go
method build (line 5) | func (s spec) build() {
FILE: _tools/src/github.com/twitchtv/retool/clean.go
type stringSet (line 11) | type stringSet
method add (line 13) | func (ss stringSet) add(val string) { ss[val] = struct{}{} }
method has (line 14) | func (ss stringSet) has(val string) bool {
function dependencies (line 21) | func dependencies(pkgs []string) stringSet {
function clean (line 54) | func clean(pkgs []string) {
function keepFile (line 133) | func keepFile(filename string) bool {
function isLegalFile (line 170) | func isLegalFile(filename string) bool {
function preserveDirectory (line 199) | func preserveDirectory(path string) bool {
FILE: _tools/src/github.com/twitchtv/retool/do.go
function setPath (line 10) | func setPath() error {
function setGoEnv (line 25) | func setGoEnv() error {
function do (line 36) | func do() {
FILE: _tools/src/github.com/twitchtv/retool/input.go
function verbosef (line 17) | func verbosef(format string, a ...interface{}) {
function parseArgs (line 23) | func parseArgs() (command string, t *tool) {
function assertArgLength (line 89) | func assertArgLength(args []string, command string, arglength int) {
function printUsageAndExit (line 95) | func printUsageAndExit(command string, exitCode int) {
constant usage (line 117) | usage = `usage: retool (add | remove | upgrade | sync | do | build | help)
constant addUsage (line 132) | addUsage = `usage: retool add [repository] [commit]
constant upgradeUsage (line 145) | upgradeUsage = `usage: retool upgrade [repository] [commit]
constant removeUsage (line 159) | removeUsage = `usage: retool remove [repository]
constant syncUsage (line 169) | syncUsage = `usage: retool sync
constant doUsage (line 177) | doUsage = `usage: retool do [command and args]
constant cleanUsage (line 187) | cleanUsage = `usage: retool clean
constant buildUsage (line 192) | buildUsage = `usage: retool build
FILE: _tools/src/github.com/twitchtv/retool/main.go
function main (line 13) | func main() {
FILE: _tools/src/github.com/twitchtv/retool/manifest.go
constant manifestFile (line 9) | manifestFile = "manifest.json"
type manifest (line 11) | type manifest
method write (line 31) | func (m manifest) write() {
method outOfDate (line 48) | func (m manifest) outOfDate(ts []*tool) bool {
method replace (line 65) | func (m manifest) replace(ts []*tool) {
function getManifest (line 13) | func getManifest() manifest {
FILE: _tools/src/github.com/twitchtv/retool/print.go
function log (line 11) | func log(msg string) {
function fatal (line 15) | func fatal(msg string, err error) {
function fatalExec (line 24) | func fatalExec(cmd string, err error) {
FILE: _tools/src/github.com/twitchtv/retool/remove.go
method remove (line 3) | func (s spec) remove(t *tool) {
FILE: _tools/src/github.com/twitchtv/retool/spec.go
constant specfile (line 13) | specfile = "tools.json"
type spec (line 15) | type spec struct
method UnmarshalJSON (line 26) | func (s *spec) UnmarshalJSON(data []byte) error {
method MarshalJSON (line 42) | func (s spec) MarshalJSON() ([]byte, error) {
method write (line 49) | func (s spec) write() error {
method find (line 78) | func (s spec) find(t *tool) int {
method cleanup (line 87) | func (s spec) cleanup() {
type jsonSpec (line 21) | type jsonSpec struct
function readPath (line 95) | func readPath(path string) (spec, error) {
function read (line 112) | func read() (spec, error) {
function specExists (line 117) | func specExists() bool {
function writeBlankSpec (line 130) | func writeBlankSpec() error {
FILE: _tools/src/github.com/twitchtv/retool/sync.go
method sync (line 5) | func (s spec) sync() {
FILE: _tools/src/github.com/twitchtv/retool/tool.go
type tool (line 13) | type tool struct
method path (line 20) | func (t *tool) path() string {
method executable (line 24) | func (t *tool) executable() string {
function setEnvVar (line 28) | func setEnvVar(cmd *exec.Cmd, key, val string) {
function get (line 50) | func get(t *tool) error {
function setVersion (line 61) | func setVersion(t *tool) error {
function download (line 137) | func download(t *tool) error {
function install (line 151) | func install(t *tool) error {
FILE: _tools/src/github.com/twitchtv/retool/tooldir.go
constant toolDirName (line 17) | toolDirName = "_tools"
function getRepoRoot (line 35) | func getRepoRoot() (string, error) {
function ensureTooldir (line 51) | func ensureTooldir() error {
FILE: _tools/src/github.com/twitchtv/retool/upgrade.go
method upgrade (line 3) | func (s spec) upgrade(t *tool) {
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/collection.go
type Collection (line 6) | type Collection
method Len (line 10) | func (c Collection) Len() int {
method Less (line 16) | func (c Collection) Less(i, j int) bool {
method Swap (line 22) | func (c Collection) Swap(i, j int) {
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/constraints.go
type Constraints (line 12) | type Constraints struct
method Check (line 44) | func (cs Constraints) Check(v *Version) bool {
method Validate (line 65) | func (cs Constraints) Validate(v *Version) (bool, []error) {
function NewConstraint (line 18) | func NewConstraint(c string) (*Constraints, error) {
function init (line 90) | func init() {
type constraint (line 137) | type constraint struct
method check (line 158) | func (c *constraint) check(v *Version) bool {
type cfunc (line 162) | type cfunc
function parseConstraint (line 164) | func parseConstraint(c string) (*constraint, error) {
function constraintNotEqual (line 209) | func constraintNotEqual(v *Version, c *constraint) bool {
function constraintGreaterThan (line 234) | func constraintGreaterThan(v *Version, c *constraint) bool {
function constraintLessThan (line 252) | func constraintLessThan(v *Version, c *constraint) bool {
function constraintGreaterThanEqual (line 273) | func constraintGreaterThanEqual(v *Version, c *constraint) bool {
function constraintLessThanEqual (line 290) | func constraintLessThanEqual(v *Version, c *constraint) bool {
function constraintTilde (line 317) | func constraintTilde(v *Version, c *constraint) bool {
function constraintTildeOrEqual (line 349) | func constraintTildeOrEqual(v *Version, c *constraint) bool {
function constraintCaret (line 371) | func constraintCaret(v *Version, c *constraint) bool {
constant cvRegex (line 392) | cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` +
function isX (line 396) | func isX(x string) bool {
function rewriteRange (line 405) | func rewriteRange(i string) string {
function isNonZero (line 420) | func isNonZero(v *Version) bool {
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/version.go
constant SemVerRegex (line 30) | SemVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` +
constant ValidPrerelease (line 36) | ValidPrerelease string = `^([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*)`
type Version (line 39) | type Version struct
method String (line 109) | func (v *Version) String() string {
method Original (line 124) | func (v *Version) Original() string {
method Major (line 129) | func (v *Version) Major() int64 {
method Minor (line 134) | func (v *Version) Minor() int64 {
method Patch (line 139) | func (v *Version) Patch() int64 {
method Prerelease (line 144) | func (v *Version) Prerelease() string {
method Metadata (line 149) | func (v *Version) Metadata() string {
method originalVPrefix (line 154) | func (v *Version) originalVPrefix() string {
method IncPatch (line 168) | func (v Version) IncPatch() Version {
method IncMinor (line 191) | func (v Version) IncMinor() Version {
method IncMajor (line 207) | func (v Version) IncMajor() Version {
method SetPrerelease (line 220) | func (v Version) SetPrerelease(prerelease string) (Version, error) {
method SetMetadata (line 232) | func (v Version) SetMetadata(metadata string) (Version, error) {
method LessThan (line 243) | func (v *Version) LessThan(o *Version) bool {
method GreaterThan (line 248) | func (v *Version) GreaterThan(o *Version) bool {
method Equal (line 255) | func (v *Version) Equal(o *Version) bool {
method Compare (line 264) | func (v *Version) Compare(o *Version) int {
function init (line 46) | func init() {
function NewVersion (line 53) | func NewVersion(v string) (*Version, error) {
function MustParse (line 96) | func MustParse(v string) *Version {
function compareSegment (line 294) | func compareSegment(v, o int64) int {
function comparePrerelease (line 305) | func comparePrerelease(v, o string) int {
function comparePrePart (line 348) | func comparePrePart(s, o string) int {
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/pkg/errors/errors.go
function New (line 101) | func New(message string) error {
function Errorf (line 111) | func Errorf(format string, args ...interface{}) error {
type fundamental (line 119) | type fundamental struct
method Error (line 124) | func (f *fundamental) Error() string { return f.msg }
method Format (line 126) | func (f *fundamental) Format(s fmt.State, verb rune) {
function WithStack (line 144) | func WithStack(err error) error {
type withStack (line 154) | type withStack struct
method Cause (line 159) | func (w *withStack) Cause() error { return w.error }
method Format (line 161) | func (w *withStack) Format(s fmt.State, verb rune) {
function Wrap (line 180) | func Wrap(err error, message string) error {
function Wrapf (line 197) | func Wrapf(err error, format string, args ...interface{}) error {
function WithMessage (line 213) | func WithMessage(err error, message string) error {
type withMessage (line 223) | type withMessage struct
method Error (line 228) | func (w *withMessage) Error() string { return w.msg + ": " + w.cause.E...
method Cause (line 229) | func (w *withMessage) Cause() error { return w.cause }
method Format (line 231) | func (w *withMessage) Format(s fmt.State, verb rune) {
function Cause (line 256) | func Cause(err error) error {
FILE: _tools/src/github.com/twitchtv/retool/vendor/github.com/pkg/errors/stack.go
type Frame (line 12) | type Frame
method pc (line 16) | func (f Frame) pc() uintptr { return uintptr(f) - 1 }
method file (line 20) | func (f Frame) file() string {
method line (line 31) | func (f Frame) line() int {
method Format (line 51) | func (f Frame) Format(s fmt.State, verb rune) {
type StackTrace (line 80) | type StackTrace
method Format (line 82) | func (st StackTrace) Format(s fmt.State, verb rune) {
type stack (line 101) | type stack
method Format (line 103) | func (s *stack) Format(st fmt.State, verb rune) {
method StackTrace (line 116) | func (s *stack) StackTrace() StackTrace {
function callers (line 124) | func callers() *stack {
function funcname (line 133) | func funcname(name string) string {
function trimGOPATH (line 140) | func trimGOPATH(name, file string) string {
FILE: _tools/src/golang.org/x/sys/execabs/execabs.go
function relError (line 41) | func relError(file, path string) error {
function LookPath (line 54) | func LookPath(file string) (string, error) {
function fixCmd (line 65) | func fixCmd(name string, cmd *exec.Cmd) {
function CommandContext (line 83) | func CommandContext(ctx context.Context, name string, arg ...string) *ex...
function Command (line 98) | func Command(name string, arg ...string) *exec.Cmd {
FILE: _tools/src/golang.org/x/tools/go/ast/astutil/enclosing.go
function PathEnclosingInterval (line 61) | func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path [...
type tokenNode (line 164) | type tokenNode struct
method Pos (line 169) | func (n tokenNode) Pos() token.Pos {
method End (line 173) | func (n tokenNode) End() token.Pos {
function tok (line 177) | func tok(pos token.Pos, len int) ast.Node {
function childrenOf (line 185) | func childrenOf(n ast.Node) []ast.Node {
type byPos (line 463) | type byPos
method Len (line 465) | func (sl byPos) Len() int {
method Less (line 468) | func (sl byPos) Less(i, j int) bool {
method Swap (line 471) | func (sl byPos) Swap(i, j int) {
function NodeDescription (line 482) | func NodeDescription(n ast.Node) string {
FILE: _tools/src/golang.org/x/tools/go/ast/astutil/imports.go
function AddImport (line 17) | func AddImport(fset *token.FileSet, f *ast.File, path string) (added boo...
function AddNamedImport (line 28) | func AddNamedImport(fset *token.FileSet, f *ast.File, name, path string)...
function isThirdParty (line 193) | func isThirdParty(importPath string) bool {
function DeleteImport (line 201) | func DeleteImport(fset *token.FileSet, f *ast.File, path string) (delete...
function DeleteNamedImport (line 207) | func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path stri...
function RewriteImport (line 330) | func RewriteImport(fset *token.FileSet, f *ast.File, oldPath, newPath st...
function UsesImport (line 344) | func UsesImport(f *ast.File, path string) (used bool) {
type visitFn (line 376) | type visitFn
method Visit (line 378) | func (fn visitFn) Visit(node ast.Node) ast.Visitor {
function imports (line 384) | func imports(f *ast.File, name, path string) bool {
function importSpec (line 395) | func importSpec(f *ast.File, path string) *ast.ImportSpec {
function importName (line 406) | func importName(s *ast.ImportSpec) string {
function importPath (line 415) | func importPath(s *ast.ImportSpec) string {
function declImports (line 424) | func declImports(gen *ast.GenDecl, path string) bool {
function matchLen (line 438) | func matchLen(x, y string) int {
function isTopName (line 449) | func isTopName(n ast.Expr, name string) bool {
function Imports (line 455) | func Imports(fset *token.FileSet, f *ast.File) [][]*ast.ImportSpec {
FILE: _tools/src/golang.org/x/tools/go/ast/astutil/rewrite.go
type ApplyFunc (line 20) | type ApplyFunc
function Apply (line 43) | func Apply(root ast.Node, pre, post ApplyFunc) (result ast.Node) {
type Cursor (line 71) | type Cursor struct
method Node (line 79) | func (c *Cursor) Node() ast.Node { return c.node }
method Parent (line 82) | func (c *Cursor) Parent() ast.Node { return c.parent }
method Name (line 87) | func (c *Cursor) Name() string { return c.name }
method Index (line 93) | func (c *Cursor) Index() int {
method field (line 101) | func (c *Cursor) field() reflect.Value {
method Replace (line 107) | func (c *Cursor) Replace(n ast.Node) {
method Delete (line 128) | func (c *Cursor) Delete() {
method InsertAfter (line 149) | func (c *Cursor) InsertAfter(n ast.Node) {
method InsertBefore (line 165) | func (c *Cursor) InsertBefore(n ast.Node) {
type application (line 179) | type application struct
method apply (line 185) | func (a *application) apply(parent ast.Node, name string, iter *iterat...
method applyList (line 455) | func (a *application) applyList(parent ast.Node, name string) {
type iterator (line 451) | type iterator struct
FILE: _tools/src/golang.org/x/tools/go/ast/astutil/util.go
function Unparen (line 10) | func Unparen(e ast.Expr) ast.Expr {
FILE: _tools/src/golang.org/x/tools/go/buildutil/allpackages.go
function AllPackages (line 32) | func AllPackages(ctxt *build.Context) []string {
function ForEachPackage (line 52) | func ForEachPackage(ctxt *build.Context, found func(importPath string, e...
type item (line 75) | type item struct
function allPackages (line 84) | func allPackages(ctxt *build.Context, root string, ch chan<- item) {
function ExpandPatterns (line 143) | func ExpandPatterns(ctxt *build.Context, patterns []string) map[string]b...
FILE: _tools/src/golang.org/x/tools/go/buildutil/fakecontext.go
function FakeContext (line 34) | func FakeContext(pkgs map[string]map[string]string) *build.Context {
type byName (line 91) | type byName
method Len (line 93) | func (s byName) Len() int { return len(s) }
method Swap (line 94) | func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
method Less (line 95) | func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() }
type fakeFileInfo (line 97) | type fakeFileInfo
method Name (line 99) | func (fi fakeFileInfo) Name() string { return string(fi) }
method Sys (line 100) | func (fakeFileInfo) Sys() interface{} { return nil }
method ModTime (line 101) | func (fakeFileInfo) ModTime() time.Time { return time.Time{} }
method IsDir (line 102) | func (fakeFileInfo) IsDir() bool { return false }
method Size (line 103) | func (fakeFileInfo) Size() int64 { return 0 }
method Mode (line 104) | func (fakeFileInfo) Mode() os.FileMode { return 0644 }
type fakeDirInfo (line 106) | type fakeDirInfo
method Name (line 108) | func (fd fakeDirInfo) Name() string { return string(fd) }
method Sys (line 109) | func (fakeDirInfo) Sys() interface{} { return nil }
method ModTime (line 110) | func (fakeDirInfo) ModTime() time.Time { return time.Time{} }
method IsDir (line 111) | func (fakeDirInfo) IsDir() bool { return true }
method Size (line 112) | func (fakeDirInfo) Size() int64 { return 0 }
method Mode (line 113) | func (fakeDirInfo) Mode() os.FileMode { return 0755 }
FILE: _tools/src/golang.org/x/tools/go/buildutil/overlay.go
function OverlayContext (line 32) | func OverlayContext(orig *build.Context, overlay map[string][]byte) *bui...
function ParseOverlayArchive (line 69) | func ParseOverlayArchive(archive io.Reader) (map[string][]byte, error) {
FILE: _tools/src/golang.org/x/tools/go/buildutil/tags.go
constant TagsFlagDoc (line 11) | TagsFlagDoc = "a list of `build tags` to consider satisfied during the b...
type TagsFlag (line 24) | type TagsFlag
method Set (line 26) | func (v *TagsFlag) Set(s string) error {
method Get (line 35) | func (v *TagsFlag) Get() interface{} { return *v }
method String (line 73) | func (v *TagsFlag) String() string {
function splitQuotedFields (line 37) | func splitQuotedFields(s string) ([]string, error) {
function isSpaceByte (line 77) | func isSpaceByte(c byte) bool {
FILE: _tools/src/golang.org/x/tools/go/buildutil/util.go
function ParseFile (line 32) | func ParseFile(fset *token.FileSet, ctxt *build.Context, displayPath fun...
function ContainingPackage (line 55) | func ContainingPackage(ctxt *build.Context, dir, filename string) (*buil...
function HasSubdir (line 87) | func HasSubdir(ctxt *build.Context, root, dir string) (rel string, ok bo...
function hasSubdir (line 112) | func hasSubdir(root, dir string) (rel string, ok bool) {
function FileExists (line 129) | func FileExists(ctxt *build.Context, path string) bool {
function OpenFile (line 144) | func OpenFile(ctxt *build.Context, path string) (io.ReadCloser, error) {
function IsAbsPath (line 153) | func IsAbsPath(ctxt *build.Context, path string) bool {
function JoinPath (line 162) | func JoinPath(ctxt *build.Context, path ...string) string {
function IsDir (line 171) | func IsDir(ctxt *build.Context, path string) bool {
function ReadDir (line 181) | func ReadDir(ctxt *build.Context, path string) ([]os.FileInfo, error) {
function SplitPathList (line 190) | func SplitPathList(ctxt *build.Context, s string) []string {
function sameFile (line 200) | func sameFile(x, y string) bool {
FILE: _tools/src/golang.org/x/tools/go/internal/cgo/cgo.go
function ProcessFiles (line 73) | func ProcessFiles(bp *build.Package, fset *token.FileSet, DisplayPath fu...
function Run (line 121) | func Run(bp *build.Package, pkgdir, tmpdir string, useabs bool) (files, ...
function cflags (line 182) | func cflags(p *build.Package, def bool) (cppflags, cflags, cxxflags, ldf...
function envList (line 197) | func envList(key, def string) []string {
function stringList (line 207) | func stringList(args ...interface{}) []string {
FILE: _tools/src/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go
function pkgConfig (line 16) | func pkgConfig(mode string, pkgs []string) (flags []string, err error) {
function pkgConfigFlags (line 34) | func pkgConfigFlags(p *build.Package) (cflags []string, err error) {
FILE: _tools/src/golang.org/x/tools/go/loader/loader.go
constant trace (line 30) | trace = false
type Config (line 35) | type Config struct
method fset (line 206) | func (conf *Config) fset() *token.FileSet {
method ParseFile (line 220) | func (conf *Config) ParseFile(filename string, src interface{}) (*ast....
method FromArgs (line 265) | func (conf *Config) FromArgs(args []string, xtest bool) ([]string, err...
method CreateFromFilenames (line 303) | func (conf *Config) CreateFromFilenames(path string, filenames ...stri...
method CreateFromFiles (line 310) | func (conf *Config) CreateFromFiles(path string, files ...*ast.File) {
method ImportWithTests (line 324) | func (conf *Config) ImportWithTests(path string) { conf.addImport(path...
method Import (line 329) | func (conf *Config) Import(path string) { conf.addImport(path, false) }
method addImport (line 331) | func (conf *Config) addImport(path string, tests bool) {
method Load (line 478) | func (conf *Config) Load() (*Program, error) {
method build (line 722) | func (conf *Config) build() *build.Context {
method parsePackageFiles (line 738) | func (conf *Config) parsePackageFiles(bp *build.Package, which rune) (...
type PkgSpec (line 137) | type PkgSpec struct
type Program (line 144) | type Program struct
method PathEnclosingInterval (line 348) | func (prog *Program) PathEnclosingInterval(start, end token.Pos) (pkg ...
method InitialPackages (line 371) | func (prog *Program) InitialPackages() []*PackageInfo {
method Package (line 382) | func (prog *Program) Package(path string) *PackageInfo {
type PackageInfo (line 182) | type PackageInfo struct
method String (line 195) | func (info *PackageInfo) String() string { return info.Pkg.Path() }
method appendError (line 197) | func (info *PackageInfo) appendError(err error) {
constant FromArgsUsage (line 227) | FromArgsUsage = `
type importer (line 397) | type importer struct
method doImport (line 779) | func (imp *importer) doImport(from *PackageInfo, to string) (*types.Pa...
method findPackage (line 831) | func (imp *importer) findPackage(importPath, fromDir string, mode buil...
method importAll (line 871) | func (imp *importer) importAll(fromPath, fromDir string, imports map[s...
method findPath (line 922) | func (imp *importer) findPath(from, to string) []string {
method startLoad (line 954) | func (imp *importer) startLoad(bp *build.Package) *importInfo {
method load (line 973) | func (imp *importer) load(bp *build.Package) *PackageInfo {
method addFiles (line 998) | func (imp *importer) addFiles(info *PackageInfo, files []*ast.File, cy...
method newPackageInfo (line 1036) | func (imp *importer) newPackageInfo(path, dir string) *PackageInfo {
type findpkgKey (line 420) | type findpkgKey struct
type findpkgValue (line 426) | type findpkgValue struct
type importInfo (line 438) | type importInfo struct
method awaitCompletion (line 446) | func (ii *importInfo) awaitCompletion() {
method Complete (line 452) | func (ii *importInfo) Complete(info *PackageInfo) {
type importError (line 460) | type importError struct
type byImportPath (line 674) | type byImportPath
method Len (line 676) | func (b byImportPath) Len() int { return len(b) }
method Less (line 677) | func (b byImportPath) Less(i, j int) bool { return b[i].ImportPath < b...
method Swap (line 678) | func (b byImportPath) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
function markErrorFreePackages (line 682) | func markErrorFreePackages(allPackages map[*types.Package]*PackageInfo) {
type closure (line 1073) | type closure struct
method Import (line 1078) | func (c closure) Import(to string) (*types.Package, error) { return c....
FILE: _tools/src/golang.org/x/tools/go/loader/util.go
function parseFiles (line 31) | func parseFiles(fset *token.FileSet, ctxt *build.Context, displayPath fu...
function scanImports (line 93) | func scanImports(files []*ast.File) map[string]bool {
function tokenFileContainsPos (line 120) | func tokenFileContainsPos(f *token.File, pos token.Pos) bool {
FILE: _tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/init.go
type fileInfo (line 17) | type fileInfo struct
type structFields (line 35) | type structFields struct
method append (line 40) | func (sf *structFields) append(name string) {
function newFileInfo (line 50) | func newFileInfo(file *protogen.File) *fileInfo {
type enumInfo (line 106) | type enumInfo struct
function newEnumInfo (line 113) | func newEnumInfo(f *fileInfo, enum *protogen.Enum) *enumInfo {
type messageInfo (line 120) | type messageInfo struct
function newMessageInfo (line 130) | func newMessageInfo(f *fileInfo, message *protogen.Message) *messageInfo {
function isTrackedMessage (line 142) | func isTrackedMessage(m *messageInfo) (tracked bool) {
type extensionInfo (line 161) | type extensionInfo struct
function newExtensionInfo (line 165) | func newExtensionInfo(f *fileInfo, extension *protogen.Extension) *exten...
FILE: _tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/main.go
constant base64Package (line 38) | base64Package = protogen.GoImportPath("encoding/base64")
constant mathPackage (line 39) | mathPackage = protogen.GoImportPath("math")
constant reflectPackage (line 40) | reflectPackage = protogen.GoImportPath("reflect")
constant sortPackage (line 41) | sortPackage = protogen.GoImportPath("sort")
constant stringsPackage (line 42) | stringsPackage = protogen.GoImportPath("strings")
constant syncPackage (line 43) | syncPackage = protogen.GoImportPath("sync")
constant timePackage (line 44) | timePackage = protogen.GoImportPath("time")
constant utf8Package (line 45) | utf8Package = protogen.GoImportPath("unicode/utf8")
type goImportPath (line 62) | type goImportPath interface
function GenerateFile (line 68) | func GenerateFile(gen *protogen.Plugin, file *protogen.File) *protogen.G...
function genStandaloneComments (line 110) | func genStandaloneComments(g *protogen.GeneratedFile, f *fileInfo, n int...
function genGeneratedHeader (line 122) | func genGeneratedHeader(gen *protogen.Plugin, g *protogen.GeneratedFile,...
function genImport (line 147) | func genImport(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileI...
function genEnum (line 227) | func genEnum(g *protogen.GeneratedFile, f *fileInfo, e *enumInfo) {
function genMessage (line 317) | func genMessage(g *protogen.GeneratedFile, f *fileInfo, m *messageInfo) {
function genMessageFields (line 338) | func genMessageFields(g *protogen.GeneratedFile, f *fileInfo, m *message...
function genMessageInternalFields (line 346) | func genMessageInternalFields(g *protogen.GeneratedFile, f *fileInfo, m ...
function genMessageField (line 366) | func genMessageField(g *protogen.GeneratedFile, f *fileInfo, m *messageI...
function genMessageDefaultDecls (line 433) | func genMessageDefaultDecls(g *protogen.GeneratedFile, f *fileInfo, m *m...
function genMessageMethods (line 489) | func genMessageMethods(g *protogen.GeneratedFile, f *fileInfo, m *messag...
function genMessageBaseMethods (line 495) | func genMessageBaseMethods(g *protogen.GeneratedFile, f *fileInfo, m *me...
function genMessageGetterMethods (line 535) | func genMessageGetterMethods(g *protogen.GeneratedFile, f *fileInfo, m *...
function genMessageSetterMethods (line 596) | func genMessageSetterMethods(g *protogen.GeneratedFile, f *fileInfo, m *...
function fieldGoType (line 624) | func fieldGoType(g *protogen.GeneratedFile, f *fileInfo, field *protogen...
function fieldProtobufTagValue (line 667) | func fieldProtobufTagValue(field *protogen.Field) string {
function fieldDefaultValue (line 675) | func fieldDefaultValue(g *protogen.GeneratedFile, m *messageInfo, field ...
function fieldJSONTagValue (line 700) | func fieldJSONTagValue(field *protogen.Field) string {
function genExtensions (line 704) | func genExtensions(g *protogen.GeneratedFile, f *fileInfo) {
function genMessageOneofWrapperTypes (line 772) | func genMessageOneofWrapperTypes(g *protogen.GeneratedFile, f *fileInfo,...
function oneofInterfaceName (line 810) | func oneofInterfaceName(oneof *protogen.Oneof) string {
function genNoInterfacePragma (line 816) | func genNoInterfacePragma(g *protogen.GeneratedFile, tracked bool) {
type structTags (line 829) | type structTags
method String (line 831) | func (tags structTags) String() string {
function appendDeprecationSuffix (line 847) | func appendDeprecationSuffix(prefix protogen.Comments, deprecated bool) ...
type trailingComment (line 858) | type trailingComment
method String (line 860) | func (c trailingComment) String() string {
FILE: _tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/reflect.go
function genReflectFileDescriptor (line 20) | func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.Generate...
function genFileDescriptor (line 236) | func genFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, ...
function genEnumReflectMethods (line 283) | func genEnumReflectMethods(g *protogen.GeneratedFile, f *fileInfo, e *en...
function genMessageReflectMethods (line 306) | func genMessageReflectMethods(g *protogen.GeneratedFile, f *fileInfo, m ...
function fileVarName (line 325) | func fileVarName(f *protogen.File, suffix string) string {
function rawDescVarName (line 331) | func rawDescVarName(f *fileInfo) string {
function goTypesVarName (line 334) | func goTypesVarName(f *fileInfo) string {
function depIdxsVarName (line 337) | func depIdxsVarName(f *fileInfo) string {
function enumTypesVarName (line 340) | func enumTypesVarName(f *fileInfo) string {
function messageTypesVarName (line 343) | func messageTypesVarName(f *fileInfo) string {
function extensionTypesVarName (line 346) | func extensionTypesVarName(f *fileInfo) string {
function initFuncName (line 349) | func initFuncName(f *protogen.File) string {
FILE: _tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/well_known_types.go
function genPackageKnownComment (line 19) | func genPackageKnownComment(f *fileInfo) protogen.Comments {
function genMessageKnownFunctions (line 338) | func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m ...
FILE: _tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/main.go
constant genGoDocURL (line 24) | genGoDocURL = "https://developers.google.com/protocol-buffers/docs/refer...
constant grpcDocURL (line 25) | grpcDocURL = "https://grpc.io/docs/languages/go/quickstart/#regenerate-g...
function main (line 27) | func main() {
FILE: _tools/src/google.golang.org/protobuf/compiler/protogen/protogen.go
constant goPackageDocURL (line 42) | goPackageDocURL = "https://developers.google.com/protocol-buffers/docs/r...
function run (line 58) | func run(opts Options, f func(*Plugin) error) error {
type Plugin (line 95) | type Plugin struct
method Error (line 324) | func (gen *Plugin) Error(err error) {
method Response (line 331) | func (gen *Plugin) Response() *pluginpb.CodeGeneratorResponse {
method NewGeneratedFile (line 906) | func (gen *Plugin) NewGeneratedFile(filename string, goImportPath GoIm...
type Options (line 121) | type Options struct
method Run (line 51) | func (opts Options) Run(f func(*Plugin) error) {
method New (line 154) | func (opts Options) New(req *pluginpb.CodeGeneratorRequest) (*Plugin, ...
type File (line 381) | type File struct
function newFile (line 406) | func newFile(gen *Plugin, p *descriptorpb.FileDescriptorProto, packageNa...
function splitImportPathAndPackageName (line 475) | func splitImportPathAndPackageName(s string) (GoImportPath, GoPackageNam...
type Enum (line 483) | type Enum struct
function newEnum (line 494) | func newEnum(gen *Plugin, f *File, parent *Message, desc protoreflect.En...
type EnumValue (line 515) | type EnumValue struct
function newEnumValue (line 526) | func newEnumValue(gen *Plugin, f *File, message *Message, enum *Enum, de...
type Message (line 547) | type Message struct
method resolveDependencies (line 675) | func (message *Message) resolveDependencies(gen *Plugin) error {
function newMessage (line 563) | func newMessage(gen *Plugin, f *File, parent *Message, desc protoreflect...
type Field (line 695) | type Field struct
method resolveDependencies (line 749) | func (field *Field) resolveDependencies(gen *Plugin) error {
function newField (line 720) | func newField(gen *Plugin, f *File, message *Message, desc protoreflect....
type Oneof (line 779) | type Oneof struct
function newOneof (line 798) | func newOneof(gen *Plugin, f *File, message *Message, desc protoreflect....
type Service (line 819) | type Service struct
function newService (line 830) | func newService(gen *Plugin, f *File, desc protoreflect.ServiceDescripto...
type Method (line 845) | type Method struct
method resolveDependencies (line 871) | func (method *Method) resolveDependencies(gen *Plugin) error {
function newMethod (line 859) | func newMethod(gen *Plugin, f *File, service *Service, desc protoreflect...
type GeneratedFile (line 892) | type GeneratedFile struct
method P (line 929) | func (g *GeneratedFile) P(v ...interface{}) {
method QualifiedGoIdent (line 946) | func (g *GeneratedFile) QualifiedGoIdent(ident GoIdent) string {
method Import (line 967) | func (g *GeneratedFile) Import(importPath GoImportPath) {
method Write (line 972) | func (g *GeneratedFile) Write(p []byte) (n int, err error) {
method Skip (line 977) | func (g *GeneratedFile) Skip() {
method Unskip (line 983) | func (g *GeneratedFile) Unskip() {
method Annotate (line 993) | func (g *GeneratedFile) Annotate(symbol string, loc Location) {
method Content (line 998) | func (g *GeneratedFile) Content() ([]byte, error) {
method metaFile (line 1089) | func (g *GeneratedFile) metaFile(content []byte) (string, error) {
type GoIdent (line 1165) | type GoIdent struct
method String (line 1170) | func (id GoIdent) String() string { return fmt.Sprintf("%q.%v", id.GoI...
function newGoIdent (line 1173) | func newGoIdent(f *File, d protoreflect.Descriptor) GoIdent {
type GoImportPath (line 1183) | type GoImportPath
method String (line 1185) | func (p GoImportPath) String() string { return strconv.Quote(string(p)) }
method Ident (line 1188) | func (p GoImportPath) Ident(s string) GoIdent {
type GoPackageName (line 1193) | type GoPackageName
function cleanPackageName (line 1196) | func cleanPackageName(name string) GoPackageName {
type pathType (line 1200) | type pathType
constant pathTypeImport (line 1203) | pathTypeImport pathType = iota
constant pathTypeSourceRelative (line 1204) | pathTypeSourceRelative
type Location (line 1211) | type Location struct
method appendPath (line 1217) | func (loc Location) appendPath(num protoreflect.FieldNumber, idx int) ...
type CommentSet (line 1225) | type CommentSet struct
function makeCommentSet (line 1231) | func makeCommentSet(loc protoreflect.SourceLocation) CommentSet {
type Comments (line 1244) | type Comments
method String (line 1249) | func (c Comments) String() string {
FILE: _tools/src/google.golang.org/protobuf/encoding/prototext/decode.go
function Unmarshal (line 26) | func Unmarshal(b []byte, m proto.Message) error {
type UnmarshalOptions (line 31) | type UnmarshalOptions struct
method Unmarshal (line 57) | func (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error {
method unmarshal (line 64) | func (o UnmarshalOptions) unmarshal(b []byte, m proto.Message) error {
type decoder (line 81) | type decoder struct
method newError (line 87) | func (d decoder) newError(pos int, f string, x ...interface{}) error {
method unexpectedTokenError (line 94) | func (d decoder) unexpectedTokenError(tok text.Token) error {
method syntaxError (line 99) | func (d decoder) syntaxError(pos int, f string, x ...interface{}) error {
method unmarshalMessage (line 106) | func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) er...
method unmarshalSingular (line 265) | func (d decoder) unmarshalSingular(fd pref.FieldDescriptor, m pref.Mes...
method unmarshalScalar (line 283) | func (d decoder) unmarshalScalar(fd pref.FieldDescriptor) (pref.Value,...
method unmarshalList (line 363) | func (d decoder) unmarshalList(fd pref.FieldDescriptor, list pref.List...
method unmarshalMap (line 444) | func (d decoder) unmarshalMap(fd pref.FieldDescriptor, mmap pref.Map) ...
method unmarshalMapEntry (line 497) | func (d decoder) unmarshalMapEntry(fd pref.FieldDescriptor, mmap pref....
method unmarshalAny (line 578) | func (d decoder) unmarshalAny(m pref.Message, checkDelims bool) error {
method unmarshalExpandedAny (line 697) | func (d decoder) unmarshalExpandedAny(typeURL string, pos int) ([]byte...
method skipValue (line 722) | func (d decoder) skipValue() error {
method skipMessageValue (line 758) | func (d decoder) skipMessageValue() error {
FILE: _tools/src/google.golang.org/protobuf/encoding/prototext/encode.go
constant defaultIndent (line 27) | defaultIndent = " "
function Format (line 33) | func Format(m proto.Message) string {
function Marshal (line 40) | func Marshal(m proto.Message) ([]byte, error) {
type MarshalOptions (line 45) | type MarshalOptions struct
method Format (line 90) | func (o MarshalOptions) Format(m proto.Message) string {
method Marshal (line 104) | func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) {
method marshal (line 111) | func (o MarshalOptions) marshal(m proto.Message) ([]byte, error) {
type encoder (line 147) | type encoder struct
method marshalMessage (line 153) | func (e encoder) marshalMessage(m pref.Message, inclDelims bool) error {
method marshalField (line 193) | func (e encoder) marshalField(name string, val pref.Value, fd pref.Fie...
method marshalSingular (line 207) | func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescript...
method marshalList (line 259) | func (e encoder) marshalList(name string, list pref.List, fd pref.Fiel...
method marshalMap (line 271) | func (e encoder) marshalMap(name string, mmap pref.Map, fd pref.FieldD...
method marshalUnknown (line 296) | func (e encoder) marshalUnknown(b []byte) {
method marshalAny (line 337) | func (e encoder) marshalAny(any pref.Message) bool {
FILE: _tools/src/google.golang.org/protobuf/encoding/protowire/wire.go
type Number (line 21) | type Number
method IsValid (line 35) | func (n Number) IsValid() bool {
constant MinValidNumber (line 24) | MinValidNumber Number = 1
constant FirstReservedNumber (line 25) | FirstReservedNumber Number = 19000
constant LastReservedNumber (line 26) | LastReservedNumber Number = 19999
constant MaxValidNumber (line 27) | MaxValidNumber Number = 1<<29 - 1
type Type (line 40) | type Type
constant VarintType (line 43) | VarintType Type = 0
constant Fixed32Type (line 44) | Fixed32Type Type = 5
constant Fixed64Type (line 45) | Fixed64Type Type = 1
constant BytesType (line 46) | BytesType Type = 2
constant StartGroupType (line 47) | StartGroupType Type = 3
constant EndGroupType (line 48) | EndGroupType Type = 4
constant _ (line 52) | _ = -iota
constant errCodeTruncated (line 53) | errCodeTruncated
constant errCodeFieldNumber (line 54) | errCodeFieldNumber
constant errCodeOverflow (line 55) | errCodeOverflow
constant errCodeReserved (line 56) | errCodeReserved
constant errCodeEndGroup (line 57) | errCodeEndGroup
function ParseError (line 70) | func ParseError(n int) error {
function ConsumeField (line 96) | func ConsumeField(b []byte) (Number, Type, int) {
function ConsumeFieldValue (line 114) | func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) {
function AppendTag (line 157) | func AppendTag(b []byte, num Number, typ Type) []byte {
function ConsumeTag (line 163) | func ConsumeTag(b []byte) (Number, Type, int) {
function SizeTag (line 175) | func SizeTag(num Number) int {
function AppendVarint (line 180) | func AppendVarint(b []byte, v uint64) []byte {
function ConsumeVarint (line 262) | func ConsumeVarint(b []byte) (v uint64, n int) {
function SizeVarint (line 366) | func SizeVarint(v uint64) int {
function AppendFixed32 (line 373) | func AppendFixed32(b []byte, v uint32) []byte {
function ConsumeFixed32 (line 383) | func ConsumeFixed32(b []byte) (v uint32, n int) {
function SizeFixed32 (line 392) | func SizeFixed32() int {
function AppendFixed64 (line 397) | func AppendFixed64(b []byte, v uint64) []byte {
function ConsumeFixed64 (line 411) | func ConsumeFixed64(b []byte) (v uint64, n int) {
function SizeFixed64 (line 420) | func SizeFixed64() int {
function AppendBytes (line 425) | func AppendBytes(b []byte, v []byte) []byte {
function ConsumeBytes (line 431) | func ConsumeBytes(b []byte) (v []byte, n int) {
function SizeBytes (line 444) | func SizeBytes(n int) int {
function AppendString (line 449) | func AppendString(b []byte, v string) []byte {
function ConsumeString (line 455) | func ConsumeString(b []byte) (v string, n int) {
function AppendGroup (line 462) | func AppendGroup(b []byte, num Number, v []byte) []byte {
function ConsumeGroup (line 470) | func ConsumeGroup(num Number, b []byte) (v []byte, n int) {
function SizeGroup (line 489) | func SizeGroup(num Number, n int) int {
function DecodeTag (line 496) | func DecodeTag(x uint64) (Number, Type) {
function EncodeTag (line 505) | func EncodeTag(num Number, typ Type) uint64 {
function DecodeZigZag (line 512) | func DecodeZigZag(x uint64) int64 {
function EncodeZigZag (line 519) | func EncodeZigZag(x int64) uint64 {
function DecodeBool (line 526) | func DecodeBool(x uint64) bool {
function EncodeBool (line 533) | func EncodeBool(x bool) uint64 {
FILE: _tools/src/google.golang.org/protobuf/internal/descfmt/stringer.go
type list (line 20) | type list interface
function FormatList (line 25) | func FormatList(s fmt.State, r rune, vs list) {
function formatListOpt (line 28) | func formatListOpt(vs list, isRoot, allowMulti bool) string {
function FormatDesc (line 119) | func FormatDesc(s fmt.State, r rune, t pref.Descriptor) {
function formatDescOpt (line 122) | func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string {
type records (line 202) | type records struct
method Append (line 207) | func (rs *records) Append(v reflect.Value, accessors ...string) {
method Join (line 268) | func (rs *records) Join() string {
function formatColon (line 299) | func formatColon(padding int) string {
function joinStrings (line 310) | func joinStrings(ss []string, isMulti bool) string {
FILE: _tools/src/google.golang.org/protobuf/internal/detrand/rand.go
function Disable (line 20) | func Disable() {
function Bool (line 25) | func Bool() bool {
function Intn (line 30) | func Intn(n int) int {
function binaryHash (line 40) | func binaryHash() uint64 {
FILE: _tools/src/google.golang.org/protobuf/internal/encoding/defval/default.go
type Format (line 23) | type Format
constant _ (line 26) | _ Format = iota
constant Descriptor (line 30) | Descriptor
constant GoTag (line 33) | GoTag
function Unmarshal (line 38) | func Unmarshal(s string, k pref.Kind, evs pref.EnumValueDescriptors, f F...
function Marshal (line 121) | func Marshal(v pref.Value, ev pref.EnumValueDescriptor, k pref.Kind, f F...
function unmarshalBytes (line 175) | func unmarshalBytes(s string) ([]byte, bool) {
function marshalBytes (line 188) | func marshalBytes(b []byte) (string, bool) {
FILE: _tools/src/google.golang.org/protobuf/internal/encoding/messageset/messageset.go
constant FieldItem (line 28) | FieldItem = protowire.Number(1)
constant FieldTypeID (line 29) | FieldTypeID = protowire.Number(2)
constant FieldMessage (line 30) | FieldMessage = protowire.Number(3)
constant ExtensionName (line 42) | ExtensionName = "message_set_extension"
function IsMessageSet (line 45) | func IsMessageSet(md pref.MessageDescriptor) bool {
function IsMessageSetExtension (line 51) | func IsMessageSetExtension(fd pref.FieldDescriptor) bool {
function SizeField (line 65) | func SizeField(num protowire.Number) int {
function Unmarshal (line 76) | func Unmarshal(b []byte, wantLen bool, fn func(typeID protowire.Number, ...
function ConsumeFieldValue (line 112) | func ConsumeFieldValue(b []byte, wantLen bool) (typeid protowire.Number,...
function AppendFieldStart (line 183) | func AppendFieldStart(b []byte, num protowire.Number) []byte {
function AppendFieldEnd (line 191) | func AppendFieldEnd(b []byte) []byte {
function SizeUnknown (line 198) | func SizeUnknown(unknown []byte) (size int) {
function AppendUnknown (line 223) | func AppendUnknown(b, unknown []byte) ([]byte, error) {
FILE: _tools/src/google.golang.org/protobuf/internal/encoding/tag/tag.go
function Unmarshal (line 32) | func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescri...
function Marshal (line 143) | func Marshal(fd pref.FieldDescriptor, enumName string) string {
FILE: _tools/src/google.golang.org/protobuf/internal/encoding/text/decode.go
type Decoder (line 19) | type Decoder struct
method Peek (line 60) | func (d *Decoder) Peek() (Token, error) {
method Read (line 70) | func (d *Decoder) Read() (Token, error) {
method parseNext (line 98) | func (d *Decoder) parseNext(lastKind Kind) (Token, error) {
method currentOpenKind (line 371) | func (d *Decoder) currentOpenKind() (Kind, byte) {
method pushOpenStack (line 387) | func (d *Decoder) pushOpenStack(ch byte) {
method popOpenStack (line 391) | func (d *Decoder) popOpenStack() {
method parseFieldName (line 396) | func (d *Decoder) parseFieldName() (tok Token, err error) {
method parseTypeName (line 432) | func (d *Decoder) parseTypeName() (Token, error) {
method parseScalar (line 561) | func (d *Decoder) parseScalar() (Token, error) {
method parseLiteralValue (line 580) | func (d *Decoder) parseLiteralValue() (Token, bool) {
method consumeToken (line 590) | func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token {
method newSyntaxError (line 604) | func (d *Decoder) newSyntaxError(f string, x ...interface{}) error {
method Position (line 612) | func (d *Decoder) Position(idx int) (line int, column int) {
method tryConsumeChar (line 622) | func (d *Decoder) tryConsumeChar(c byte) bool {
method consume (line 631) | func (d *Decoder) consume(n int) {
function NewDecoder (line 44) | func NewDecoder(b []byte) *Decoder {
type call (line 52) | type call
constant readCall (line 55) | readCall call = iota
constant peekCall (line 56) | peekCall
constant mismatchedFmt (line 93) | mismatchedFmt = "mismatched close character %q"
constant unexpectedFmt (line 94) | unexpectedFmt = "unexpected character %q"
function isTypeNameChar (line 499) | func isTypeNameChar(b byte) bool {
function isWhiteSpace (line 506) | func isWhiteSpace(b byte) bool {
function parseIdent (line 519) | func parseIdent(input []byte, allowNeg bool) int {
function consume (line 637) | func consume(b []byte, n int) []byte {
function isDelim (line 660) | func isDelim(c byte) bool {
FILE: _tools/src/google.golang.org/protobuf/internal/encoding/text/decode_number.go
method parseNumberValue (line 8) | func (d *Decoder) parseNumberValue() (Token, bool) {
constant numDec (line 36) | numDec uint8 = (1 << iota) / 2
constant numHex (line 37) | numHex
constant numOct (line 38) | numOct
constant numFloat (line 39) | numFloat
type number (line 45) | type number struct
function parseNumber (line 57) | func parseNumber(input []byte) number {
FILE: _tools/src/google.golang.org/protobuf/internal/encoding/text/decode_string.go
method parseStringValue (line 24) | func (d *Decoder) parseStringValue() (Token, error) {
method parseString (line 50) | func (d *Decoder) parseString() (string, error) {
function indexNeedEscapeInBytes (line 153) | func indexNeedEscapeInBytes(b []byte) int { return indexNeedEscapeInStri...
function UnmarshalString (line 158) | func UnmarshalString(s string) (string, error) {
FILE: _tools/src/google.golang.org/protobuf/internal/encoding/text/decode_token.go
type Kind (line 18) | type Kind
method String (line 40) | func (t Kind) String() string {
constant Invalid (line 22) | Invalid Kind = iota
constant EOF (line 23) | EOF
constant Name (line 24) | Name
constant Scalar (line 25) | Scalar
constant MessageOpen (line 26) | MessageOpen
constant MessageClose (line 27) | MessageClose
constant ListOpen (line 28) | ListOpen
constant ListClose (line 29) | ListClose
constant comma (line 32) | comma
constant semicolon (line 33) | semicolon
constant bof (line 37) | bof = Invalid
type NameKind (line 68) | type NameKind
method String (line 77) | func (t NameKind) String() string {
constant IdentName (line 72) | IdentName NameKind = iota + 1
constant TypeName (line 73) | TypeName
constant FieldNumber (line 74) | FieldNumber
constant hasSeparator (line 95) | hasSeparator = 1 << 7
constant numberValue (line 99) | numberValue = iota + 1
constant stringValue (line 100) | stringValue
constant literalValue (line 101) | literalValue
constant isNegative (line 105) | isNegative = 1 << 7
type Token (line 109) | type Token struct
method Kind (line 133) | func (t Token) Kind() Kind {
method RawString (line 138) | func (t Token) RawString() string {
method Pos (line 143) | func (t Token) Pos() int {
method NameKind (line 149) | func (t Token) NameKind() NameKind {
method HasSeparator (line 158) | func (t Token) HasSeparator() bool {
method IdentName (line 166) | func (t Token) IdentName() string {
method TypeName (line 174) | func (t Token) TypeName() string {
method FieldNumber (line 184) | func (t Token) FieldNumber() int32 {
method String (line 195) | func (t Token) String() (string, bool) {
method Enum (line 203) | func (t Token) Enum() (string, bool) {
method Bool (line 211) | func (t Token) Bool() (bool, bool) {
method Uint64 (line 247) | func (t Token) Uint64() (uint64, bool) {
method Uint32 (line 260) | func (t Token) Uint32() (uint32, bool) {
method Int64 (line 273) | func (t Token) Int64() (int64, bool) {
method Int32 (line 291) | func (t Token) Int32() (int32, bool) {
method Float64 (line 309) | func (t Token) Float64() (float64, bool) {
method Float32 (line 332) | func (t Token) Float32() (float32, bool) {
function TokenEquals (line 366) | func TokenEquals(x, y Token) bool {
FILE: _tools/src/google.golang.org/protobuf/internal/encoding/text/encode.go
type encType (line 19) | type encType
constant _ (line 22) | _ encType = (1 << iota) / 2
constant name (line 23) | name
constant scalar (line 24) | scalar
constant messageOpen (line 25) | messageOpen
constant messageClose (line 26) | messageClose
type Encoder (line 31) | type Encoder struct
method Bytes (line 78) | func (e *Encoder) Bytes() []byte {
method StartMessage (line 83) | func (e *Encoder) StartMessage() {
method EndMessage (line 89) | func (e *Encoder) EndMessage() {
method WriteName (line 95) | func (e *Encoder) WriteName(s string) {
method WriteBool (line 102) | func (e *Encoder) WriteBool(b bool) {
method WriteString (line 111) | func (e *Encoder) WriteString(s string) {
method WriteFloat (line 177) | func (e *Encoder) WriteFloat(n float64, bitSize int) {
method WriteInt (line 196) | func (e *Encoder) WriteInt(n int64) {
method WriteUint (line 202) | func (e *Encoder) WriteUint(n uint64) {
method WriteLiteral (line 209) | func (e *Encoder) WriteLiteral(s string) {
method prepareNext (line 216) | func (e *Encoder) prepareNext(next encType) {
method Snapshot (line 258) | func (e *Encoder) Snapshot() encoderState {
method Reset (line 263) | func (e *Encoder) Reset(es encoderState) {
type encoderState (line 39) | type encoderState struct
function NewEncoder (line 56) | func NewEncoder(indent string, delims [2]byte, outputASCII bool) (*Encod...
function appendString (line 116) | func appendString(out []byte, in string, outputASCII bool) []byte {
function indexNeedEscapeInString (line 167) | func indexNeedEscapeInString(s string) int {
function appendFloat (line 182) | func appendFloat(out []byte, n float64, bitSize int) []byte {
function AppendString (line 268) | func AppendString(b []byte, s string) []byte {
FILE: _tools/src/google.golang.org/protobuf/internal/errors/errors.go
function New (line 20) | func New(f string, x ...interface{}) error {
type prefixError (line 24) | type prefixError struct
method Error (line 36) | func (e *prefixError) Error() string {
method Unwrap (line 40) | func (e *prefixError) Unwrap() error {
function Wrap (line 46) | func Wrap(err error, f string, x ...interface{}) error {
type wrapError (line 53) | type wrapError struct
method Error (line 58) | func (e *wrapError) Error() string {
method Unwrap (line 62) | func (e *wrapError) Unwrap() error {
method Is (line 66) | func (e *wrapError) Is(target error) bool {
function format (line 70) | func format(f string, x ...interface{}) string {
function InvalidUTF8 (line 83) | func InvalidUTF8(name string) error {
function RequiredNotSet (line 87) | func RequiredNotSet(name string) error {
FILE: _tools/src/google.golang.org/protobuf/internal/errors/is_go112.go
function Is (line 12) | func Is(err, target error) bool {
function unwrap (line 31) | func unwrap(err error) error {
FILE: _tools/src/google.golang.org/protobuf/internal/errors/is_go113.go
function Is (line 12) | func Is(err, target error) bool { return errors.Is(err, target) }
FILE: _tools/src/google.golang.org/protobuf/internal/filedesc/build.go
type Builder (line 20) | type Builder struct
method Build (line 92) | func (db Builder) Build() (out Out) {
method unmarshalCounts (line 122) | func (db *Builder) unmarshalCounts(b []byte, isFile bool) {
type resolverByIndex (line 57) | type resolverByIndex interface
constant listFieldDeps (line 64) | listFieldDeps int32 = iota
constant listExtTargets (line 65) | listExtTargets
constant listExtDeps (line 66) | listExtDeps
constant listMethInDeps (line 67) | listMethInDeps
constant listMethOutDeps (line 68) | listMethOutDeps
type Out (line 72) | type Out struct
FILE: _tools/src/google.golang.org/protobuf/internal/filedesc/desc.go
type File (line 37) | type File struct
method ParentFile (line 62) | func (fd *File) ParentFile() pref.FileDescriptor { return fd }
method Parent (line 63) | func (fd *File) Parent() pref.Descriptor { return nil }
method Index (line 64) | func (fd *File) Index() int { return 0 }
method Syntax (line 65) | func (fd *File) Syntax() pref.Syntax { return fd.L1.Syntax }
method Name (line 66) | func (fd *File) Name() pref.Name { return fd.L1.Packag...
method FullName (line 67) | func (fd *File) FullName() pref.FullName { return fd.L1.Package }
method IsPlaceholder (line 68) | func (fd *File) IsPlaceholder() bool { return false }
method Options (line 69) | func (fd *File) Options() pref.ProtoMessage {
method Path (line 75) | func (fd *File) Path() string { return fd.L1....
method Package (line 76) | func (fd *File) Package() pref.FullName { return fd.L1....
method Imports (line 77) | func (fd *File) Imports() pref.FileImports { return &fd.la...
method Enums (line 78) | func (fd *File) Enums() pref.EnumDescriptors { return &fd.L1...
method Messages (line 79) | func (fd *File) Messages() pref.MessageDescriptors { return &fd.L1...
method Extensions (line 80) | func (fd *File) Extensions() pref.ExtensionDescriptors { return &fd.L1...
method Services (line 81) | func (fd *File) Services() pref.ServiceDescriptors { return &fd.L1...
method SourceLocations (line 82) | func (fd *File) SourceLocations() pref.SourceLocations { return &fd.la...
method Format (line 83) | func (fd *File) Format(s fmt.State, r rune) { descfmt.Forma...
method ProtoType (line 84) | func (fd *File) ProtoType(pref.FileDescriptor) {}
method ProtoInternal (line 85) | func (fd *File) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 87) | func (fd *File) lazyInit() *FileL2 {
method lazyInitOnce (line 94) | func (fd *File) lazyInitOnce() {
method GoPackagePath (line 108) | func (fd *File) GoPackagePath() string {
type FileL1 (line 45) | type FileL1 struct
type FileL2 (line 55) | type FileL2 struct
type Enum (line 113) | type Enum struct
method Options (line 138) | func (ed *Enum) Options() pref.ProtoMessage {
method Values (line 144) | func (ed *Enum) Values() pref.EnumValueDescriptors {
method ReservedNames (line 150) | func (ed *Enum) ReservedNames() pref.Names { return &ed.lazyInit...
method ReservedRanges (line 151) | func (ed *Enum) ReservedRanges() pref.EnumRanges { return &ed.lazyInit...
method Format (line 152) | func (ed *Enum) Format(s fmt.State, r rune) { descfmt.FormatDesc(...
method ProtoType (line 153) | func (ed *Enum) ProtoType(pref.EnumDescriptor) {}
method lazyInit (line 154) | func (ed *Enum) lazyInit() *EnumL2 {
type EnumL1 (line 118) | type EnumL1 struct
type EnumL2 (line 121) | type EnumL2 struct
type EnumValue (line 128) | type EnumValue struct
method Options (line 159) | func (ed *EnumValue) Options() pref.ProtoMessage {
method Number (line 165) | func (ed *EnumValue) Number() pref.EnumNumber { return ed.L...
method Format (line 166) | func (ed *EnumValue) Format(s fmt.State, r rune) { descfmt.For...
method ProtoType (line 167) | func (ed *EnumValue) ProtoType(pref.EnumValueDescriptor) {}
type EnumValueL1 (line 132) | type EnumValueL1 struct
type Message (line 170) | type Message struct
method Options (line 225) | func (md *Message) Options() pref.ProtoMessage {
method IsMapEntry (line 231) | func (md *Message) IsMapEntry() bool { return md.L1....
method Fields (line 232) | func (md *Message) Fields() pref.FieldDescriptors { return &md.la...
method Oneofs (line 233) | func (md *Message) Oneofs() pref.OneofDescriptors { return &md.la...
method ReservedNames (line 234) | func (md *Message) ReservedNames() pref.Names { return &md.la...
method ReservedRanges (line 235) | func (md *Message) ReservedRanges() pref.FieldRanges { return &md.la...
method RequiredNumbers (line 236) | func (md *Message) RequiredNumbers() pref.FieldNumbers { return &md.la...
method ExtensionRanges (line 237) | func (md *Message) ExtensionRanges() pref.FieldRanges { return &md.la...
method ExtensionRangeOptions (line 238) | func (md *Message) ExtensionRangeOptions(i int) pref.ProtoMessage {
method Enums (line 244) | func (md *Message) Enums() pref.EnumDescriptors { return &md...
method Messages (line 245) | func (md *Message) Messages() pref.MessageDescriptors { return &md...
method Extensions (line 246) | func (md *Message) Extensions() pref.ExtensionDescriptors { return &md...
method ProtoType (line 247) | func (md *Message) ProtoType(pref.MessageDescriptor) {}
method Format (line 248) | func (md *Message) Format(s fmt.State, r rune) { descfmt.Fo...
method lazyInit (line 249) | func (md *Message) lazyInit() *MessageL2 {
method IsMessageSet (line 259) | func (md *Message) IsMessageSet() bool {
type MessageL1 (line 175) | type MessageL1 struct
type MessageL2 (line 182) | type MessageL2 struct
type Field (line 193) | type Field struct
method Options (line 263) | func (fd *Field) Options() pref.ProtoMessage {
method Number (line 269) | func (fd *Field) Number() pref.FieldNumber { return fd.L1.Number }
method Cardinality (line 270) | func (fd *Field) Cardinality() pref.Cardinality { return fd.L1.Cardina...
method Kind (line 271) | func (fd *Field) Kind() pref.Kind { return fd.L1.Kind }
method HasJSONName (line 272) | func (fd *Field) HasJSONName() bool { return fd.L1.StringN...
method JSONName (line 273) | func (fd *Field) JSONName() string { return fd.L1.StringN...
method TextName (line 274) | func (fd *Field) TextName() string { return fd.L1.StringN...
method HasPresence (line 275) | func (fd *Field) HasPresence() bool {
method HasOptionalKeyword (line 278) | func (fd *Field) HasOptionalKeyword() bool {
method IsPacked (line 281) | func (fd *Field) IsPacked() bool {
method IsExtension (line 291) | func (fd *Field) IsExtension() bool { return false }
method IsWeak (line 292) | func (fd *Field) IsWeak() bool { return fd.L1.IsWeak }
method IsList (line 293) | func (fd *Field) IsList() bool { return fd.Cardinality() == pref....
method IsMap (line 294) | func (fd *Field) IsMap() bool { return fd.Message() != nil && fd...
method MapKey (line 295) | func (fd *Field) MapKey() pref.FieldDescriptor {
method MapValue (line 301) | func (fd *Field) MapValue() pref.FieldDescriptor {
method HasDefault (line 307) | func (fd *Field) HasDefault() bool { return ...
method Default (line 308) | func (fd *Field) Default() pref.Value { return ...
method DefaultEnumValue (line 309) | func (fd *Field) DefaultEnumValue() pref.EnumValueDescriptor { return ...
method ContainingOneof (line 310) | func (fd *Field) ContainingOneof() pref.OneofDescriptor { return ...
method ContainingMessage (line 311) | func (fd *Field) ContainingMessage() pref.MessageDescriptor {
method Enum (line 314) | func (fd *Field) Enum() pref.EnumDescriptor {
method Message (line 317) | func (fd *Field) Message() pref.MessageDescriptor {
method Format (line 325) | func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(...
method ProtoType (line 326) | func (fd *Field) ProtoType(pref.FieldDescriptor) {}
method EnforceUTF8 (line 335) | func (fd *Field) EnforceUTF8() bool {
type FieldL1 (line 197) | type FieldL1 struct
type Oneof (line 215) | type Oneof struct
method IsSynthetic (line 342) | func (od *Oneof) IsSynthetic() bool {
method Options (line 345) | func (od *Oneof) Options() pref.ProtoMessage {
method Fields (line 351) | func (od *Oneof) Fields() pref.FieldDescriptors { return &od.L1.Fields }
method Format (line 352) | func (od *Oneof) Format(s fmt.State, r rune) { descfmt.FormatDesc(...
method ProtoType (line 353) | func (od *Oneof) ProtoType(pref.OneofDescriptor) {}
type OneofL1 (line 219) | type OneofL1 struct
type Extension (line 356) | type Extension struct
method Options (line 378) | func (xd *Extension) Options() pref.ProtoMessage {
method Number (line 384) | func (xd *Extension) Number() pref.FieldNumber { return xd.L1.Num...
method Cardinality (line 385) | func (xd *Extension) Cardinality() pref.Cardinality { return xd.L1.Car...
method Kind (line 386) | func (xd *Extension) Kind() pref.Kind { return xd.L1.Kind }
method HasJSONName (line 387) | func (xd *Extension) HasJSONName() bool { return xd.lazyIn...
method JSONName (line 388) | func (xd *Extension) JSONName() string { return xd.lazyIn...
method TextName (line 389) | func (xd *Extension) TextName() string { return xd.lazyIn...
method HasPresence (line 390) | func (xd *Extension) HasPresence() bool { return xd.L1.Car...
method HasOptionalKeyword (line 391) | func (xd *Extension) HasOptionalKeyword() bool {
method IsPacked (line 394) | func (xd *Extension) IsPacked() bool { ret...
method IsExtension (line 395) | func (xd *Extension) IsExtension() bool { ret...
method IsWeak (line 396) | func (xd *Extension) IsWeak() bool { ret...
method IsList (line 397) | func (xd *Extension) IsList() bool { ret...
method IsMap (line 398) | func (xd *Extension) IsMap() bool { ret...
method MapKey (line 399) | func (xd *Extension) MapKey() pref.FieldDescriptor { ret...
method MapValue (line 400) | func (xd *Extension) MapValue() pref.FieldDescriptor { ret...
method HasDefault (line 401) | func (xd *Extension) HasDefault() bool { ret...
method Default (line 402) | func (xd *Extension) Default() pref.Value { ret...
method DefaultEnumValue (line 403) | func (xd *Extension) DefaultEnumValue() pref.EnumValueDescriptor { ret...
method ContainingOneof (line 404) | func (xd *Extension) ContainingOneof() pref.OneofDescriptor { ret...
method ContainingMessage (line 405) | func (xd *Extension) ContainingMessage() pref.MessageDescriptor { ret...
method Enum (line 406) | func (xd *Extension) Enum() pref.EnumDescriptor { ret...
method Message (line 407) | func (xd *Extension) Message() pref.MessageDescriptor { ret...
method Format (line 408) | func (xd *Extension) Format(s fmt.State, r rune) { des...
method ProtoType (line 409) | func (xd *Extension) ProtoType(pref.FieldDescriptor) {}
method ProtoInternal (line 410) | func (xd *Extension) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 411) | func (xd *Extension) lazyInit() *ExtensionL2 {
type ExtensionL1 (line 361) | type ExtensionL1 struct
type ExtensionL2 (line 367) | type ExtensionL2 struct
type Service (line 417) | type Service struct
method Options (line 441) | func (sd *Service) Options() pref.ProtoMessage {
method Methods (line 447) | func (sd *Service) Methods() pref.MethodDescriptors { return &sd.l...
method Format (line 448) | func (sd *Service) Format(s fmt.State, r rune) { descfmt.Form...
method ProtoType (line 449) | func (sd *Service) ProtoType(pref.ServiceDescriptor) {}
method ProtoInternal (line 450) | func (sd *Service) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 451) | func (sd *Service) lazyInit() *ServiceL2 {
type ServiceL1 (line 422) | type ServiceL1 struct
type ServiceL2 (line 423) | type ServiceL2 struct
type Method (line 428) | type Method struct
method Options (line 456) | func (md *Method) Options() pref.ProtoMessage {
method Input (line 462) | func (md *Method) Input() pref.MessageDescriptor { return md.L1....
method Output (line 463) | func (md *Method) Output() pref.MessageDescriptor { return md.L1....
method IsStreamingClient (line 464) | func (md *Method) IsStreamingClient() bool { return md.L1....
method IsStreamingServer (line 465) | func (md *Method) IsStreamingServer() bool { return md.L1....
method Format (line 466) | func (md *Method) Format(s fmt.State, r rune) { descfmt.Forma...
method ProtoType (line 467) | func (md *Method) ProtoType(pref.MethodDescriptor) {}
method ProtoInternal (line 468) | func (md *Method) ProtoInternal(pragma.DoNotImplement) {}
type MethodL1 (line 432) | type MethodL1 struct
type Base (line 478) | type Base struct
method Name (line 489) | func (d *Base) Name() pref.Name { return d.L0.FullName.Name() }
method FullName (line 490) | func (d *Base) FullName() pref.FullName { return d.L0.FullName }
method ParentFile (line 491) | func (d *Base) ParentFile() pref.FileDescriptor {
method Parent (line 497) | func (d *Base) Parent() pref.Descriptor { return d.L0.Pare...
method Index (line 498) | func (d *Base) Index() int { return d.L0.Index }
method Syntax (line 499) | func (d *Base) Syntax() pref.Syntax { return d.L0.Pare...
method IsPlaceholder (line 500) | func (d *Base) IsPlaceholder() bool { return false }
method ProtoInternal (line 501) | func (d *Base) ProtoInternal(pragma.DoNotImplement) {}
type BaseL0 (line 481) | type BaseL0 struct
type stringName (line 503) | type stringName struct
method InitJSON (line 511) | func (s *stringName) InitJSON(name string) {
method lazyInit (line 516) | func (s *stringName) lazyInit(fd pref.FieldDescriptor) *stringName {
method getJSON (line 544) | func (s *stringName) getJSON(fd pref.FieldDescriptor) string { return ...
method getText (line 545) | func (s *stringName) getText(fd pref.FieldDescriptor) string { return ...
function DefaultValue (line 547) | func DefaultValue(v pref.Value, ev pref.EnumValueDescriptor) defaultValue {
function unmarshalDefault (line 557) | func unmarshalDefault(b []byte, k pref.Kind, pf *File, ed pref.EnumDescr...
type defaultValue (line 584) | type defaultValue struct
method get (line 591) | func (dv *defaultValue) get(fd pref.FieldDescriptor) pref.Value {
FILE: _tools/src/google.golang.org/protobuf/internal/filedesc/desc_init.go
type fileRaw (line 18) | type fileRaw struct
function newRawFile (line 26) | func newRawFile(db Builder) *File {
method initDecls (line 48) | func (fd *File) initDecls(numEnums, numMessages, numExtensions, numServi...
method allocEnums (line 55) | func (fd *File) allocEnums(n int) []Enum {
method allocMessages (line 61) | func (fd *File) allocMessages(n int) []Message {
method allocExtensions (line 67) | func (fd *File) allocExtensions(n int) []Extension {
method allocServices (line 73) | func (fd *File) allocServices(n int) []Service {
method checkDecls (line 82) | func (fd *File) checkDecls() {
method unmarshalSeed (line 94) | func (fd *File) unmarshalSeed(b []byte) {
method unmarshalSeed (line 222) | func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd p...
method unmarshalSeed (line 274) | func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, p...
method unmarshalSeedOptions (line 369) | func (md *Message) unmarshalSeedOptions(b []byte) {
method unmarshalSeed (line 390) | func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File,...
method unmarshalSeed (line 426) | func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, p...
function getBuilder (line 453) | func getBuilder() *strs.Builder {
function putBuilder (line 456) | func putBuilder(b *strs.Builder) {
function makeFullName (line 462) | func makeFullName(sb *strs.Builder, b []byte) pref.FullName {
function appendFullName (line 469) | func appendFullName(sb *strs.Builder, prefix pref.FullName, suffix []byt...
FILE: _tools/src/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
method lazyRawInit (line 19) | func (fd *File) lazyRawInit() {
method resolveMessages (line 26) | func (file *File) resolveMessages() {
method resolveExtensions (line 58) | func (file *File) resolveExtensions() {
method resolveServices (line 80) | func (file *File) resolveServices() {
method resolveEnumDependency (line 95) | func (file *File) resolveEnumDependency(ed pref.EnumDescriptor, i, j int...
method resolveMessageDependency (line 113) | func (file *File) resolveMessageDependency(md pref.MessageDescriptor, i,...
method unmarshalFull (line 131) | func (fd *File) unmarshalFull(b []byte) {
method unmarshalFull (line 185) | func (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) {
function unmarshalEnumReservedRange (line 222) | func unmarshalEnumReservedRange(b []byte) (r [2]pref.EnumNumber) {
method unmarshalFull (line 244) | func (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File,...
method unmarshalFull (line 279) | func (md *Message) unmarshalFull(b []byte, sb *strs.Builder) {
method unmarshalOptions (line 341) | func (md *Message) unmarshalOptions(b []byte) {
function unmarshalMessageReservedRange (line 362) | func unmarshalMessageReservedRange(b []byte) (r [2]pref.FieldNumber) {
function unmarshalMessageExtensionRange (line 384) | func unmarshalMessageExtensionRange(b []byte) (r [2]pref.FieldNumber, ra...
method unmarshalFull (line 413) | func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd ...
method unmarshalOptions (line 480) | func (fd *Field) unmarshalOptions(b []byte) {
method unmarshalFull (line 507) | func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd ...
method unmarshalFull (line 534) | func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) {
method unmarshalOptions (line 580) | func (xd *Extension) unmarshalOptions(b []byte) {
method unmarshalFull (line 599) | func (sd *Service) unmarshalFull(b []byte, sb *strs.Builder) {
method unmarshalFull (line 630) | func (md *Method) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd...
function appendOptions (line 672) | func appendOptions(dst, src []byte) []byte {
method optionsUnmarshaler (line 683) | func (db *Builder) optionsUnmarshaler(p *pref.ProtoMessage, b []byte) fu...
FILE: _tools/src/google.golang.org/protobuf/internal/filedesc/desc_list.go
type FileImports (line 23) | type FileImports
method Len (line 25) | func (p *FileImports) Len() int { return le...
method Get (line 26) | func (p *FileImports) Get(i int) pref.FileImport { return (*...
method Format (line 27) | func (p *FileImports) Format(s fmt.State, r rune) { descfmt.F...
method ProtoInternal (line 28) | func (p *FileImports) ProtoInternal(pragma.DoNotImplement) {}
type Names (line 30) | type Names struct
method Len (line 36) | func (p *Names) Len() int { return len(p.Li...
method Get (line 37) | func (p *Names) Get(i int) pref.Name { return p.List[i] }
method Has (line 38) | func (p *Names) Has(s pref.Name) bool { return p.lazyIn...
method Format (line 39) | func (p *Names) Format(s fmt.State, r rune) { descfmt.FormatL...
method ProtoInternal (line 40) | func (p *Names) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 41) | func (p *Names) lazyInit() *Names {
method CheckValid (line 55) | func (p *Names) CheckValid() error {
type EnumRanges (line 69) | type EnumRanges struct
method Len (line 75) | func (p *EnumRanges) Len() int { return len(p.List) }
method Get (line 76) | func (p *EnumRanges) Get(i int) [2]pref.EnumNumber { return p.List[i] }
method Has (line 77) | func (p *EnumRanges) Has(n pref.EnumNumber) bool {
method Format (line 91) | func (p *EnumRanges) Format(s fmt.State, r rune) { descfmt.Fo...
method ProtoInternal (line 92) | func (p *EnumRanges) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 93) | func (p *EnumRanges) lazyInit() *EnumRanges {
method CheckValid (line 105) | func (p *EnumRanges) CheckValid() error {
type enumRange (line 120) | type enumRange
method Start (line 122) | func (r enumRange) Start() protoreflect.EnumNumber { return r[0] }
method End (line 123) | func (r enumRange) End() protoreflect.EnumNumber { return r[1] }
method String (line 124) | func (r enumRange) String() string {
type FieldRanges (line 131) | type FieldRanges struct
method Len (line 137) | func (p *FieldRanges) Len() int { return len(p.Li...
method Get (line 138) | func (p *FieldRanges) Get(i int) [2]pref.FieldNumber { return p.List[i] }
method Has (line 139) | func (p *FieldRanges) Has(n pref.FieldNumber) bool {
method Format (line 153) | func (p *FieldRanges) Format(s fmt.State, r rune) { descfmt.F...
method ProtoInternal (line 154) | func (p *FieldRanges) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 155) | func (p *FieldRanges) lazyInit() *FieldRanges {
method CheckValid (line 167) | func (p *FieldRanges) CheckValid(isMessageSet bool) error {
method CheckOverlap (line 194) | func (p *FieldRanges) CheckOverlap(q *FieldRanges) error {
function isValidFieldNumber (line 189) | func isValidFieldNumber(n protoreflect.FieldNumber, isMessageSet bool) b...
type fieldRange (line 212) | type fieldRange
method Start (line 214) | func (r fieldRange) Start() protoreflect.FieldNumber { return r[0] }
method End (line 215) | func (r fieldRange) End() protoreflect.FieldNumber { return r[1] - 1 }
method String (line 216) | func (r fieldRange) String() string {
type FieldNumbers (line 223) | type FieldNumbers struct
method Len (line 229) | func (p *FieldNumbers) Len() int { return len(p.List) }
method Get (line 230) | func (p *FieldNumbers) Get(i int) pref.FieldNumber { return p.List[i] }
method Has (line 231) | func (p *FieldNumbers) Has(n pref.FieldNumber) bool {
method Format (line 243) | func (p *FieldNumbers) Format(s fmt.State, r rune) { descfmt....
method ProtoInternal (line 244) | func (p *FieldNumbers) ProtoInternal(pragma.DoNotImplement) {}
type OneofFields (line 246) | type OneofFields struct
method Len (line 255) | func (p *OneofFields) Len() int ...
method Get (line 256) | func (p *OneofFields) Get(i int) pref.FieldDescriptor ...
method ByName (line 257) | func (p *OneofFields) ByName(s pref.Name) pref.FieldDescriptor ...
method ByJSONName (line 258) | func (p *OneofFields) ByJSONName(s string) pref.FieldDescriptor ...
method ByTextName (line 259) | func (p *OneofFields) ByTextName(s string) pref.FieldDescriptor ...
method ByNumber (line 260) | func (p *OneofFields) ByNumber(n pref.FieldNumber) pref.FieldDescripto...
method Format (line 261) | func (p *OneofFields) Format(s fmt.State, r rune) ...
method ProtoInternal (line 262) | func (p *OneofFields) ProtoInternal(pragma.DoNotImplement) ...
method lazyInit (line 264) | func (p *OneofFields) lazyInit() *OneofFields {
type SourceLocations (line 283) | type SourceLocations struct
method Len (line 298) | func (p *SourceLocations) Len() int { return len(...
method Get (line 299) | func (p *SourceLocations) Get(i int) pref.SourceLocation { return p.la...
method byKey (line 300) | func (p *SourceLocations) byKey(k pathKey) pref.SourceLocation {
method ByPath (line 306) | func (p *SourceLocations) ByPath(path pref.SourcePath) pref.SourceLoca...
method ByDescriptor (line 309) | func (p *SourceLocations) ByDescriptor(desc pref.Descriptor) pref.Sour...
method lazyInit (line 407) | func (p *SourceLocations) lazyInit() *SourceLocations {
method ProtoInternal (line 430) | func (p *SourceLocations) ProtoInternal(pragma.DoNotImplement) {}
type pathKey (line 433) | type pathKey struct
function newPathKey (line 438) | func newPathKey(p pref.SourcePath) (k pathKey) {
FILE: _tools/src/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go
type Enums (line 18) | type Enums struct
method Len (line 24) | func (p *Enums) Len() int {
method Get (line 27) | func (p *Enums) Get(i int) protoreflect.EnumDescriptor {
method ByName (line 30) | func (p *Enums) ByName(s protoreflect.Name) protoreflect.EnumDescriptor {
method Format (line 36) | func (p *Enums) Format(s fmt.State, r rune) {
method ProtoInternal (line 39) | func (p *Enums) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 40) | func (p *Enums) lazyInit() *Enums {
type EnumValues (line 55) | type EnumValues struct
method Len (line 62) | func (p *EnumValues) Len() int {
method Get (line 65) | func (p *EnumValues) Get(i int) protoreflect.EnumValueDescriptor {
method ByName (line 68) | func (p *EnumValues) ByName(s protoreflect.Name) protoreflect.EnumValu...
method ByNumber (line 74) | func (p *EnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect....
method Format (line 80) | func (p *EnumValues) Format(s fmt.State, r rune) {
method ProtoInternal (line 83) | func (p *EnumValues) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 84) | func (p *EnumValues) lazyInit() *EnumValues {
type Messages (line 103) | type Messages struct
method Len (line 109) | func (p *Messages) Len() int {
method Get (line 112) | func (p *Messages) Get(i int) protoreflect.MessageDescriptor {
method ByName (line 115) | func (p *Messages) ByName(s protoreflect.Name) protoreflect.MessageDes...
method Format (line 121) | func (p *Messages) Format(s fmt.State, r rune) {
method ProtoInternal (line 124) | func (p *Messages) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 125) | func (p *Messages) lazyInit() *Messages {
type Fields (line 140) | type Fields struct
method Len (line 149) | func (p *Fields) Len() int {
method Get (line 152) | func (p *Fields) Get(i int) protoreflect.FieldDescriptor {
method ByName (line 155) | func (p *Fields) ByName(s protoreflect.Name) protoreflect.FieldDescrip...
method ByJSONName (line 161) | func (p *Fields) ByJSONName(s string) protoreflect.FieldDescriptor {
method ByTextName (line 167) | func (p *Fields) ByTextName(s string) protoreflect.FieldDescriptor {
method ByNumber (line 173) | func (p *Fields) ByNumber(n protoreflect.FieldNumber) protoreflect.Fie...
method Format (line 179) | func (p *Fields) Format(s fmt.State, r rune) {
method ProtoInternal (line 182) | func (p *Fields) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 183) | func (p *Fields) lazyInit() *Fields {
type Oneofs (line 210) | type Oneofs struct
method Len (line 216) | func (p *Oneofs) Len() int {
method Get (line 219) | func (p *Oneofs) Get(i int) protoreflect.OneofDescriptor {
method ByName (line 222) | func (p *Oneofs) ByName(s protoreflect.Name) protoreflect.OneofDescrip...
method Format (line 228) | func (p *Oneofs) Format(s fmt.State, r rune) {
method ProtoInternal (line 231) | func (p *Oneofs) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 232) | func (p *Oneofs) lazyInit() *Oneofs {
type Extensions (line 247) | type Extensions struct
method Len (line 253) | func (p *Extensions) Len() int {
method Get (line 256) | func (p *Extensions) Get(i int) protoreflect.ExtensionDescriptor {
method ByName (line 259) | func (p *Extensions) ByName(s protoreflect.Name) protoreflect.Extensio...
method Format (line 265) | func (p *Extensions) Format(s fmt.State, r rune) {
method ProtoInternal (line 268) | func (p *Extensions) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 269) | func (p *Extensions) lazyInit() *Extensions {
type Services (line 284) | type Services struct
method Len (line 290) | func (p *Services) Len() int {
method Get (line 293) | func (p *Services) Get(i int) protoreflect.ServiceDescriptor {
method ByName (line 296) | func (p *Services) ByName(s protoreflect.Name) protoreflect.ServiceDes...
method Format (line 302) | func (p *Services) Format(s fmt.State, r rune) {
method ProtoInternal (line 305) | func (p *Services) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 306) | func (p *Services) lazyInit() *Services {
type Methods (line 321) | type Methods struct
method Len (line 327) | func (p *Methods) Len() int {
method Get (line 330) | func (p *Methods) Get(i int) protoreflect.MethodDescriptor {
method ByName (line 333) | func (p *Methods) ByName(s protoreflect.Name) protoreflect.MethodDescr...
method Format (line 339) | func (p *Methods) Format(s fmt.State, r rune) {
method ProtoInternal (line 342) | func (p *Methods) ProtoInternal(pragma.DoNotImplement) {}
method lazyInit (line 343) | func (p *Methods) lazyInit() *Methods {
FILE: _tools/src/google.golang.org/protobuf/internal/filedesc/placeholder.go
type PlaceholderFile (line 31) | type PlaceholderFile
method ParentFile (line 33) | func (f PlaceholderFile) ParentFile() pref.FileDescriptor { retu...
method Parent (line 34) | func (f PlaceholderFile) Parent() pref.Descriptor { retu...
method Index (line 35) | func (f PlaceholderFile) Index() int { retu...
method Syntax (line 36) | func (f PlaceholderFile) Syntax() pref.Syntax { retu...
method Name (line 37) | func (f PlaceholderFile) Name() pref.Name { retu...
method FullName (line 38) | func (f PlaceholderFile) FullName() pref.FullName { retu...
method IsPlaceholder (line 39) | func (f PlaceholderFile) IsPlaceholder() bool { retu...
method Options (line 40) | func (f PlaceholderFile) Options() pref.ProtoMessage { retu...
method Path (line 41) | func (f PlaceholderFile) Path() string { retu...
method Package (line 42) | func (f PlaceholderFile) Package() pref.FullName { retu...
method Imports (line 43) | func (f PlaceholderFile) Imports() pref.FileImports { retu...
method Messages (line 44) | func (f PlaceholderFile) Messages() pref.MessageDescriptors { retu...
method Enums (line 45) | func (f PlaceholderFile) Enums() pref.EnumDescriptors { retu...
method Extensions (line 46) | func (f PlaceholderFile) Extensions() pref.ExtensionDescriptors { retu...
method Services (line 47) | func (f PlaceholderFile) Services() pref.ServiceDescriptors { retu...
method SourceLocations (line 48) | func (f PlaceholderFile) SourceLocations() pref.SourceLocations { retu...
method ProtoType (line 49) | func (f PlaceholderFile) ProtoType(pref.FileDescriptor) { retu...
method ProtoInternal (line 50) | func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement) { retu...
type PlaceholderEnum (line 53) | type PlaceholderEnum
method ParentFile (line 55) | func (e PlaceholderEnum) ParentFile() pref.FileDescriptor { return...
method Parent (line 56) | func (e PlaceholderEnum) Parent() pref.Descriptor { return...
method Index (line 57) | func (e PlaceholderEnum) Index() int { return...
method Syntax (line 58) | func (e PlaceholderEnum) Syntax() pref.Syntax { return...
method Name (line 59) | func (e PlaceholderEnum) Name() pref.Name { return...
method FullName (line 60) | func (e PlaceholderEnum) FullName() pref.FullName { return...
method IsPlaceholder (line 61) | func (e PlaceholderEnum) IsPlaceholder() bool { return...
method Options (line 62) | func (e PlaceholderEnum) Options() pref.ProtoMessage { return...
method Values (line 63) | func (e PlaceholderEnum) Values() pref.EnumValueDescriptors { return...
method ReservedNames (line 64) | func (e PlaceholderEnum) ReservedNames() pref.Names { return...
method ReservedRanges (line 65) | func (e PlaceholderEnum) ReservedRanges() pref.EnumRanges { return...
method ProtoType (line 66) | func (e PlaceholderEnum) ProtoType(pref.EnumDescriptor) { return }
method ProtoInternal (line 67) | func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement) { return }
type PlaceholderEnumValue (line 70) | type PlaceholderEnumValue
method ParentFile (line 72) | func (e PlaceholderEnumValue) ParentFile() pref.FileDescriptor { r...
method Parent (line 73) | func (e PlaceholderEnumValue) Parent() pref.Descriptor { r...
method Index (line 74) | func (e PlaceholderEnumValue) Index() int { r...
method Syntax (line 75) | func (e PlaceholderEnumValue) Syntax() pref.Syntax { r...
method Name (line 76) | func (e PlaceholderEnumValue) Name() pref.Name { r...
method FullName (line 77) | func (e PlaceholderEnumValue) FullName() pref.FullName { r...
method IsPlaceholder (line 78) | func (e PlaceholderEnumValue) IsPlaceholder() bool { r...
method Options (line 79) | func (e PlaceholderEnumValue) Options() pref.ProtoMessage { r...
method Number (line 80) | func (e PlaceholderEnumValue) Number() pref.EnumNumber { r...
method ProtoType (line 81) | func (e PlaceholderEnumValue) ProtoType(pref.EnumValueDescriptor) { r...
method ProtoInternal (line 82) | func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement) { r...
type PlaceholderMessage (line 85) | type PlaceholderMessage
method ParentFile (line 87) | func (m PlaceholderMessage) ParentFile() pref.FileDescriptor ...
method Parent (line 88) | func (m PlaceholderMessage) Parent() pref.Descriptor ...
method Index (line 89) | func (m PlaceholderMessage) Index() int ...
method Syntax (line 90) | func (m PlaceholderMessage) Syntax() pref.Syntax ...
method Name (line 91) | func (m PlaceholderMessage) Name() pref.Name ...
method FullName (line 92) | func (m PlaceholderMessage) FullName() pref.FullName ...
method IsPlaceholder (line 93) | func (m PlaceholderMessage) IsPlaceholder() bool ...
method Options (line 94) | func (m PlaceholderMessage) Options() pref.ProtoMessage ...
method IsMapEntry (line 95) | func (m PlaceholderMessage) IsMapEntry() bool ...
method Fields (line 96) | func (m PlaceholderMessage) Fields() pref.FieldDescriptors ...
method Oneofs (line 97) | func (m PlaceholderMessage) Oneofs() pref.OneofDescriptors ...
method ReservedNames (line 98) | func (m PlaceholderMessage) ReservedNames() pref.Names ...
method ReservedRanges (line 99) | func (m PlaceholderMessage) ReservedRanges() pref.FieldRanges ...
method RequiredNumbers (line 100) | func (m PlaceholderMessage) RequiredNumbers() pref.FieldNumbers ...
method ExtensionRanges (line 101) | func (m PlaceholderMessage) ExtensionRanges() pref.FieldRanges ...
method ExtensionRangeOptions (line 102) | func (m PlaceholderMessage) ExtensionRangeOptions(int) pref.ProtoMessa...
method Messages (line 103) | func (m PlaceholderMessage) Messages() pref.MessageDescriptors ...
method Enums (line 104) | func (m PlaceholderMessage) Enums() pref.EnumDescriptors ...
method Extensions (line 105) | func (m PlaceholderMessage) Extensions() pref.ExtensionDescriptors ...
method ProtoType (line 106) | func (m PlaceholderMessage) ProtoType(pref.MessageDescriptor) ...
method ProtoInternal (line 107) | func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement) ...
FILE: _tools/src/google.golang.org/protobuf/internal/filetype/build.go
type Builder (line 53) | type Builder struct
method Build (line 122) | func (tb Builder) Build() (out Out) {
type Out (line 118) | type Out struct
type depIdxs (line 263) | type depIdxs
method Get (line 266) | func (x depIdxs) Get(i, j int32) int32 {
type resolverByIndex (line 271) | type resolverByIndex struct
method FindEnumByIndex (line 283) | func (r *resolverByIndex) FindEnumByIndex(i, j int32, es []fdesc.Enum,...
method FindMessageByIndex (line 291) | func (r *resolverByIndex) FindMessageByIndex(i, j int32, es []fdesc.En...
type fileRegistry (line 276) | type fileRegistry interface
FILE: _tools/src/google.golang.org/protobuf/internal/flags/flags.go
constant ProtoLegacy (line 17) | ProtoLegacy = protoLegacy
constant LazyUnmarshalExtensions (line 24) | LazyUnmarshalExtensions = ProtoLegacy
FILE: _tools/src/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go
constant protoLegacy (line 9) | protoLegacy = false
FILE: _tools/src/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go
constant protoLegacy (line 9) | protoLegacy = true
FILE: _tools/src/google.golang.org/protobuf/internal/genid/any_gen.go
constant File_google_protobuf_any_proto (line 13) | File_google_protobuf_any_proto = "google/protobuf/any.proto"
constant Any_message_name (line 17) | Any_message_name protoreflect.Name = "Any"
constant Any_message_fullname (line 18) | Any_message_fullname protoreflect.FullName = "google.protobuf.Any"
constant Any_TypeUrl_field_name (line 23) | Any_TypeUrl_field_name protoreflect.Name = "type_url"
constant Any_Value_field_name (line 24) | Any_Value_field_name protoreflect.Name = "value"
constant Any_TypeUrl_field_fullname (line 26) | Any_TypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Any....
constant Any_Value_field_fullname (line 27) | Any_Value_field_fullname protoreflect.FullName = "google.protobuf.Any....
constant Any_TypeUrl_field_number (line 32) | Any_TypeUrl_field_number protoreflect.FieldNumber = 1
constant Any_Value_field_number (line 33) | Any_Value_field_number protoreflect.FieldNumber = 2
FILE: _tools/src/google.golang.org/protobuf/internal/genid/api_gen.go
constant File_google_protobuf_api_proto (line 13) | File_google_protobuf_api_proto = "google/protobuf/api.proto"
constant Api_message_name (line 17) | Api_message_name protoreflect.Name = "Api"
constant Api_message_fullname (line 18) | Api_message_fullname protoreflect.FullName = "google.protobuf.Api"
constant Api_Name_field_name (line 23) | Api_Name_field_name protoreflect.Name = "name"
constant Api_Methods_field_name (line 24) | Api_Methods_field_name protoreflect.Name = "methods"
constant Api_Options_field_name (line 25) | Api_Options_field_name protoreflect.Name = "options"
constant Api_Version_field_name (line 26) | Api_Version_field_name protoreflect.Name = "version"
constant Api_SourceContext_field_name (line 27) | Api_SourceContext_field_name protoreflect.Name = "source_context"
constant Api_Mixins_field_name (line 28) | Api_Mixins_field_name protoreflect.Name = "mixins"
constant Api_Syntax_field_name (line 29) | Api_Syntax_field_name protoreflect.Name = "syntax"
constant Api_Name_field_fullname (line 31) | Api_Name_field_fullname protoreflect.FullName = "google.protobu...
constant Api_Methods_field_fullname (line 32) | Api_Methods_field_fullname protoreflect.FullName = "google.protobu...
constant Api_Options_field_fullname (line 33) | Api_Options_field_fullname protoreflect.FullName = "google.protobu...
constant Api_Version_field_fullname (line 34) | Api_Version_field_fullname protoreflect.FullName = "google.protobu...
constant Api_SourceContext_field_fullname (line 35) | Api_SourceContext_field_fullname protoreflect.FullName = "google.protobu...
constant Api_Mixins_field_fullname (line 36) | Api_Mixins_field_fullname protoreflect.FullName = "google.protobu...
constant Api_Syntax_field_fullname (line 37) | Api_Syntax_field_fullname protoreflect.FullName = "google.protobu...
constant Api_Name_field_number (line 42) | Api_Name_field_number protoreflect.FieldNumber = 1
constant Api_Methods_field_number (line 43) | Api_Methods_field_number protoreflect.FieldNumber = 2
constant Api_Options_field_number (line 44) | Api_Options_field_number protoreflect.FieldNumber = 3
constant Api_Version_field_number (line 45) | Api_Version_field_number protoreflect.FieldNumber = 4
constant Api_SourceContext_field_number (line 46) | Api_SourceContext_field_number protoreflect.FieldNumber = 5
constant Api_Mixins_field_number (line 47) | Api_Mixins_field_number protoreflect.FieldNumber = 6
constant Api_Syntax_field_number (line 48) | Api_Syntax_field_number protoreflect.FieldNumber = 7
constant Method_message_name (line 53) | Method_message_name protoreflect.Name = "Method"
constant Method_message_fullname (line 54) | Method_message_fullname protoreflect.FullName = "google.protobuf.Method"
constant Method_Name_field_name (line 59) | Method_Name_field_name protoreflect.Name = "name"
constant Method_RequestTypeUrl_field_name (line 60) | Method_RequestTypeUrl_field_name protoreflect.Name = "request_type_url"
constant Method_RequestStreaming_field_name (line 61) | Method_RequestStreaming_field_name protoreflect.Name = "request_streaming"
constant Method_ResponseTypeUrl_field_name (line 62) | Method_ResponseTypeUrl_field_name protoreflect.Name = "response_type_url"
constant Method_ResponseStreaming_field_name (line 63) | Method_ResponseStreaming_field_name protoreflect.Name = "response_stream...
constant Method_Options_field_name (line 64) | Method_Options_field_name protoreflect.Name = "options"
constant Method_Syntax_field_name (line 65) | Method_Syntax_field_name protoreflect.Name = "syntax"
constant Method_Name_field_fullname (line 67) | Method_Name_field_fullname protoreflect.FullName = "google....
constant Method_RequestTypeUrl_field_fullname (line 68) | Method_RequestTypeUrl_field_fullname protoreflect.FullName = "google....
constant Method_RequestStreaming_field_fullname (line 69) | Method_RequestStreaming_field_fullname protoreflect.FullName = "google....
constant Method_ResponseTypeUrl_field_fullname (line 70) | Method_ResponseTypeUrl_field_fullname protoreflect.FullName = "google....
constant Method_ResponseStreaming_field_fullname (line 71) | Method_ResponseStreaming_field_fullname protoreflect.FullName = "google....
constant Method_Options_field_fullname (line 72) | Method_Options_field_fullname protoreflect.FullName = "google....
constant Method_Syntax_field_fullname (line 73) | Method_Syntax_field_fullname protoreflect.FullName = "google....
constant Method_Name_field_number (line 78) | Method_Name_field_number protoreflect.FieldNumber = 1
constant Method_RequestTypeUrl_field_number (line 79) | Method_RequestTypeUrl_field_number protoreflect.FieldNumber = 2
constant Method_RequestStreaming_field_number (line 80) | Method_RequestStreaming_field_number protoreflect.FieldNumber = 3
constant Method_ResponseTypeUrl_field_number (line 81) | Method_ResponseTypeUrl_field_number protoreflect.FieldNumber = 4
constant Method_ResponseStreaming_field_number (line 82) | Method_ResponseStreaming_field_number protoreflect.FieldNumber = 5
constant Method_Options_field_number (line 83) | Method_Options_field_number protoreflect.FieldNumber = 6
constant Method_Syntax_field_number (line 84) | Method_Syntax_field_number protoreflect.FieldNumber = 7
constant Mixin_message_name (line 89) | Mixin_message_name protoreflect.Name = "Mixin"
constant Mixin_message_fullname (line 90) | Mixin_message_fullname protoreflect.FullName = "google.protobuf.Mixin"
constant Mixin_Name_field_name (line 95) | Mixin_Name_field_name protoreflect.Name = "name"
constant Mixin_Root_field_name (line 96) | Mixin_Root_field_name protoreflect.Name = "root"
constant Mixin_Name_field_fullname (line 98) | Mixin_Name_field_fullname protoreflect.FullName = "google.protobuf.Mixin...
constant Mixin_Root_field_fullname (line 99) | Mixin_Root_field_fullname protoreflect.FullName = "google.protobuf.Mixin...
constant Mixin_Name_field_number (line 104) | Mixin_Name_field_number protoreflect.FieldNumber = 1
constant Mixin_Root_field_number (line 105) | Mixin_Root_field_number protoreflect.FieldNumber = 2
FILE: _tools/src/google.golang.org/protobuf/internal/genid/descriptor_gen.go
constant File_google_protobuf_descriptor_proto (line 13) | File_google_protobuf_descriptor_proto = "google/protobuf/descriptor.proto"
constant FileDescriptorSet_message_name (line 17) | FileDescriptorSet_message_name protoreflect.Name = "FileDescript...
constant FileDescriptorSet_message_fullname (line 18) | FileDescriptorSet_message_fullname protoreflect.FullName = "google.proto...
constant FileDescriptorSet_File_field_name (line 23) | FileDescriptorSet_File_field_name protoreflect.Name = "file"
constant FileDescriptorSet_File_field_fullname (line 25) | FileDescriptorSet_File_field_fullname protoreflect.FullName = "google.pr...
constant FileDescriptorSet_File_field_number (line 30) | FileDescriptorSet_File_field_number protoreflect.FieldNumber = 1
constant FileDescriptorProto_message_name (line 35) | FileDescriptorProto_message_name protoreflect.Name = "FileDescri...
constant FileDescriptorProto_message_fullname (line 36) | FileDescriptorProto_message_fullname protoreflect.FullName = "google.pro...
constant FileDescriptorProto_Name_field_name (line 41) | FileDescriptorProto_Name_field_name protoreflect.Name = "name"
constant FileDescriptorProto_Package_field_name (line 42) | FileDescriptorProto_Package_field_name protoreflect.Name = "pac...
constant FileDescriptorProto_Dependency_field_name (line 43) | FileDescriptorProto_Dependency_field_name protoreflect.Name = "dep...
constant FileDescriptorProto_PublicDependency_field_name (line 44) | FileDescriptorProto_PublicDependency_field_name protoreflect.Name = "pub...
constant FileDescriptorProto_WeakDependency_field_name (line 45) | FileDescriptorProto_WeakDependency_field_name protoreflect.Name = "wea...
constant FileDescriptorProto_MessageType_field_name (line 46) | FileDescriptorProto_MessageType_field_name protoreflect.Name = "mes...
constant FileDescriptorProto_EnumType_field_name (line 47) | FileDescriptorProto_EnumType_field_name protoreflect.Name = "enu...
constant FileDescriptorProto_Service_field_name (line 48) | FileDescriptorProto_Service_field_name protoreflect.Name = "ser...
constant FileDescriptorProto_Extension_field_name (line 49) | FileDescriptorProto_Extension_field_name protoreflect.Name = "ext...
constant FileDescriptorProto_Options_field_name (line 50) | FileDescriptorProto_Options_field_name protoreflect.Name = "opt...
constant FileDescriptorProto_SourceCodeInfo_field_name (line 51) | FileDescriptorProto_SourceCodeInfo_field_name protoreflect.Name = "sou...
constant FileDescriptorProto_Syntax_field_name (line 52) | FileDescriptorProto_Syntax_field_name protoreflect.Name = "syn...
constant FileDescriptorProto_Name_field_fullname (line 54) | FileDescriptorProto_Name_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_Package_field_fullname (line 55) | FileDescriptorProto_Package_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_Dependency_field_fullname (line 56) | FileDescriptorProto_Dependency_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_PublicDependency_field_fullname (line 57) | FileDescriptorProto_PublicDependency_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_WeakDependency_field_fullname (line 58) | FileDescriptorProto_WeakDependency_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_MessageType_field_fullname (line 59) | FileDescriptorProto_MessageType_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_EnumType_field_fullname (line 60) | FileDescriptorProto_EnumType_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_Service_field_fullname (line 61) | FileDescriptorProto_Service_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_Extension_field_fullname (line 62) | FileDescriptorProto_Extension_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_Options_field_fullname (line 63) | FileDescriptorProto_Options_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_SourceCodeInfo_field_fullname (line 64) | FileDescriptorProto_SourceCodeInfo_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_Syntax_field_fullname (line 65) | FileDescriptorProto_Syntax_field_fullname protoreflect.FullNam...
constant FileDescriptorProto_Name_field_number (line 70) | FileDescriptorProto_Name_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_Package_field_number (line 71) | FileDescriptorProto_Package_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_Dependency_field_number (line 72) | FileDescriptorProto_Dependency_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_PublicDependency_field_number (line 73) | FileDescriptorProto_PublicDependency_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_WeakDependency_field_number (line 74) | FileDescriptorProto_WeakDependency_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_MessageType_field_number (line 75) | FileDescriptorProto_MessageType_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_EnumType_field_number (line 76) | FileDescriptorProto_EnumType_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_Service_field_number (line 77) | FileDescriptorProto_Service_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_Extension_field_number (line 78) | FileDescriptorProto_Extension_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_Options_field_number (line 79) | FileDescriptorProto_Options_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_SourceCodeInfo_field_number (line 80) | FileDescriptorProto_SourceCodeInfo_field_number protoreflect.FieldNumb...
constant FileDescriptorProto_Syntax_field_number (line 81) | FileDescriptorProto_Syntax_field_number protoreflect.FieldNumb...
constant DescriptorProto_message_name (line 86) | DescriptorProto_message_name protoreflect.Name = "DescriptorProto"
constant DescriptorProto_message_fullname (line 87) | DescriptorProto_message_fullname protoreflect.FullName = "google.protobu...
constant DescriptorProto_Name_field_name (line 92) | DescriptorProto_Name_field_name protoreflect.Name = "name"
constant DescriptorProto_Field_field_name (line 93) | DescriptorProto_Field_field_name protoreflect.Name = "field"
constant DescriptorProto_Extension_field_name (line 94) | DescriptorProto_Extension_field_name protoreflect.Name = "extension"
constant DescriptorProto_NestedType_field_name (line 95) | DescriptorProto_NestedType_field_name protoreflect.Name = "nested_type"
constant DescriptorProto_EnumType_field_name (line 96) | DescriptorProto_EnumType_field_name protoreflect.Name = "enum_type"
constant DescriptorProto_ExtensionRange_field_name (line 97) | DescriptorProto_ExtensionRange_field_name protoreflect.Name = "extension...
constant DescriptorProto_OneofDecl_field_name (line 98) | DescriptorProto_OneofDecl_field_name protoreflect.Name = "oneof_decl"
constant DescriptorProto_Options_field_name (line 99) | DescriptorProto_Options_field_name protoreflect.Name = "options"
constant DescriptorProto_ReservedRange_field_name (line 100) | DescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_...
constant DescriptorProto_ReservedName_field_name (line 101) | DescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_...
constant DescriptorProto_Name_field_fullname (line 103) | DescriptorProto_Name_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_Field_field_fullname (line 104) | DescriptorProto_Field_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_Extension_field_fullname (line 105) | DescriptorProto_Extension_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_NestedType_field_fullname (line 106) | DescriptorProto_NestedType_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_EnumType_field_fullname (line 107) | DescriptorProto_EnumType_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_ExtensionRange_field_fullname (line 108) | DescriptorProto_ExtensionRange_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_OneofDecl_field_fullname (line 109) | DescriptorProto_OneofDecl_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_Options_field_fullname (line 110) | DescriptorProto_Options_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_ReservedRange_field_fullname (line 111) | DescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_ReservedName_field_fullname (line 112) | DescriptorProto_ReservedName_field_fullname protoreflect.FullName = "g...
constant DescriptorProto_Name_field_number (line 117) | DescriptorProto_Name_field_number protoreflect.FieldNumber = 1
constant DescriptorProto_Field_field_number (line 118) | DescriptorProto_Field_field_number protoreflect.FieldNumber = 2
constant DescriptorProto_Extension_field_number (line 119) | DescriptorProto_Extension_field_number protoreflect.FieldNumber = 6
constant DescriptorProto_NestedType_field_number (line 120) | DescriptorProto_NestedType_field_number protoreflect.FieldNumber = 3
constant DescriptorProto_EnumType_field_number (line 121) | DescriptorProto_EnumType_field_number protoreflect.FieldNumber = 4
constant DescriptorProto_ExtensionRange_field_number (line 122) | DescriptorProto_ExtensionRange_field_number protoreflect.FieldNumber = 5
constant DescriptorProto_OneofDecl_field_number (line 123) | DescriptorProto_OneofDecl_field_number protoreflect.FieldNumber = 8
constant DescriptorProto_Options_field_number (line 124) | DescriptorProto_Options_field_number protoreflect.FieldNumber = 7
constant DescriptorProto_ReservedRange_field_number (line 125) | DescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 9
constant DescriptorProto_ReservedName_field_number (line 126) | DescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 10
constant DescriptorProto_ExtensionRange_message_name (line 131) | DescriptorProto_ExtensionRange_message_name protoreflect.Name = ...
constant DescriptorProto_ExtensionRange_message_fullname (line 132) | DescriptorProto_ExtensionRange_message_fullname protoreflect.FullName = ...
constant DescriptorProto_ExtensionRange_Start_field_name (line 137) | DescriptorProto_ExtensionRange_Start_field_name protoreflect.Name = "s...
constant DescriptorProto_ExtensionRange_End_field_name (line 138) | DescriptorProto_ExtensionRange_End_field_name protoreflect.Name = "end"
constant DescriptorProto_ExtensionRange_Options_field_name (line 139) | DescriptorProto_ExtensionRange_Options_field_name protoreflect.Name = "o...
constant DescriptorProto_ExtensionRange_Start_field_fullname (line 141) | DescriptorProto_ExtensionRange_Start_field_fullname protoreflect.FullN...
constant DescriptorProto_ExtensionRange_End_field_fullname (line 142) | DescriptorProto_ExtensionRange_End_field_fullname protoreflect.FullN...
constant DescriptorProto_ExtensionRange_Options_field_fullname (line 143) | DescriptorProto_ExtensionRange_Options_field_fullname protoreflect.FullN...
constant DescriptorProto_ExtensionRange_Start_field_number (line 148) | DescriptorProto_ExtensionRange_Start_field_number protoreflect.FieldNu...
constant DescriptorProto_ExtensionRange_End_field_number (line 149) | DescriptorProto_ExtensionRange_End_field_number protoreflect.FieldNu...
constant DescriptorProto_ExtensionRange_Options_field_number (line 150) | DescriptorProto_ExtensionRange_Options_field_number protoreflect.FieldNu...
constant DescriptorProto_ReservedRange_message_name (line 155) | DescriptorProto_ReservedRange_message_name protoreflect.Name = "...
constant DescriptorProto_ReservedRange_message_fullname (line 156) | DescriptorProto_ReservedRange_message_fullname protoreflect.FullName = "...
constant DescriptorProto_ReservedRange_Start_field_name (line 161) | DescriptorProto_ReservedRange_Start_field_name protoreflect.Name = "start"
constant DescriptorProto_ReservedRange_End_field_name (line 162) | DescriptorProto_ReservedRange_End_field_name protoreflect.Name = "end"
constant DescriptorProto_ReservedRange_Start_field_fullname (line 164) | DescriptorProto_ReservedRange_Start_field_fullname protoreflect.FullName...
constant DescriptorProto_ReservedRange_End_field_fullname (line 165) | DescriptorProto_ReservedRange_End_field_fullname protoreflect.FullName...
constant DescriptorProto_ReservedRange_Start_field_number (line 170) | DescriptorProto_ReservedRange_Start_field_number protoreflect.FieldNumbe...
constant DescriptorProto_ReservedRange_End_field_number (line 171) | DescriptorProto_ReservedRange_End_field_number protoreflect.FieldNumbe...
constant ExtensionRangeOptions_message_name (line 176) | ExtensionRangeOptions_message_name protoreflect.Name = "Extensio...
constant ExtensionRangeOptions_message_fullname (line 177) | ExtensionRangeOptions_message_fullname protoreflect.FullName = "google.p...
constant ExtensionRangeOptions_UninterpretedOption_field_name (line 182) | ExtensionRangeOptions_UninterpretedOption_field_name protoreflect.Name =...
constant ExtensionRangeOptions_UninterpretedOption_field_fullname (line 184) | ExtensionRangeOptions_UninterpretedOption_field_fullname protoreflect.Fu...
constant ExtensionRangeOptions_UninterpretedOption_field_number (line 189) | ExtensionRangeOptions_UninterpretedOption_field_number protoreflect.Fiel...
constant FieldDescriptorProto_message_name (line 194) | FieldDescriptorProto_message_name protoreflect.Name = "FieldDesc...
constant FieldDescriptorProto_message_fullname (line 195) | FieldDescriptorProto_message_fullname protoreflect.FullName = "google.pr...
constant FieldDescriptorProto_Name_field_name (line 200) | FieldDescriptorProto_Name_field_name protoreflect.Name = "name"
constant FieldDescriptorProto_Number_field_name (line 201) | FieldDescriptorProto_Number_field_name protoreflect.Name = "number"
constant FieldDescriptorProto_Label_field_name (line 202) | FieldDescriptorProto_Label_field_name protoreflect.Name = "label"
constant FieldDescriptorProto_Type_field_name (line 203) | FieldDescriptorProto_Type_field_name protoreflect.Name = "type"
constant FieldDescriptorProto_TypeName_field_name (line 204) | FieldDescriptorProto_TypeName_field_name protoreflect.Name = "type...
constant FieldDescriptorProto_Extendee_field_name (line 205) | FieldDescriptorProto_Extendee_field_name protoreflect.Name = "exte...
constant FieldDescriptorProto_DefaultValue_field_name (line 206) | FieldDescriptorProto_DefaultValue_field_name protoreflect.Name = "defa...
constant FieldDescriptorProto_OneofIndex_field_name (line 207) | FieldDescriptorProto_OneofIndex_field_name protoreflect.Name = "oneo...
constant FieldDescriptorProto_JsonName_field_name (line 208) | FieldDescriptorProto_JsonName_field_name protoreflect.Name = "json...
constant FieldDescriptorProto_Options_field_name (line 209) | FieldDescriptorProto_Options_field_name protoreflect.Name = "opti...
constant FieldDescriptorProto_Proto3Optional_field_name (line 210) | FieldDescriptorProto_Proto3Optional_field_name protoreflect.Name = "prot...
constant FieldDescriptorProto_Name_field_fullname (line 212) | FieldDescriptorProto_Name_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_Number_field_fullname (line 213) | FieldDescriptorProto_Number_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_Label_field_fullname (line 214) | FieldDescriptorProto_Label_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_Type_field_fullname (line 215) | FieldDescriptorProto_Type_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_TypeName_field_fullname (line 216) | FieldDescriptorProto_TypeName_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_Extendee_field_fullname (line 217) | FieldDescriptorProto_Extendee_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_DefaultValue_field_fullname (line 218) | FieldDescriptorProto_DefaultValue_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_OneofIndex_field_fullname (line 219) | FieldDescriptorProto_OneofIndex_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_JsonName_field_fullname (line 220) | FieldDescriptorProto_JsonName_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_Options_field_fullname (line 221) | FieldDescriptorProto_Options_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_Proto3Optional_field_fullname (line 222) | FieldDescriptorProto_Proto3Optional_field_fullname protoreflect.FullName...
constant FieldDescriptorProto_Name_field_number (line 227) | FieldDescriptorProto_Name_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_Number_field_number (line 228) | FieldDescriptorProto_Number_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_Label_field_number (line 229) | FieldDescriptorProto_Label_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_Type_field_number (line 230) | FieldDescriptorProto_Type_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_TypeName_field_number (line 231) | FieldDescriptorProto_TypeName_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_Extendee_field_number (line 232) | FieldDescriptorProto_Extendee_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_DefaultValue_field_number (line 233) | FieldDescriptorProto_DefaultValue_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_OneofIndex_field_number (line 234) | FieldDescriptorProto_OneofIndex_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_JsonName_field_number (line 235) | FieldDescriptorProto_JsonName_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_Options_field_number (line 236) | FieldDescriptorProto_Options_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_Proto3Optional_field_number (line 237) | FieldDescriptorProto_Proto3Optional_field_number protoreflect.FieldNumbe...
constant FieldDescriptorProto_Type_enum_fullname (line 242) | FieldDescriptorProto_Type_enum_fullname = "google.protobuf.FieldDescript...
constant FieldDescriptorProto_Type_enum_name (line 243) | FieldDescriptorProto_Type_enum_name = "Type"
constant FieldDescriptorProto_Label_enum_fullname (line 248) | FieldDescriptorProto_Label_enum_fullname = "google.protobuf.FieldDescrip...
constant FieldDescriptorProto_Label_enum_name (line 249) | FieldDescriptorProto_Label_enum_name = "Label"
constant OneofDescriptorProto_message_name (line 254) | OneofDescriptorProto_message_name protoreflect.Name = "OneofDesc...
constant OneofDescriptorProto_message_fullname (line 255) | OneofDescriptorProto_message_fullname protoreflect.FullName = "google.pr...
constant OneofDescriptorProto_Name_field_name (line 260) | OneofDescriptorProto_Name_field_name protoreflect.Name = "name"
constant OneofDescriptorProto_Options_field_name (line 261) | OneofDescriptorProto_Options_field_name protoreflect.Name = "options"
constant OneofDescriptorProto_Name_field_fullname (line 263) | OneofDescriptorProto_Name_field_fullname protoreflect.FullName = "goo...
constant OneofDescriptorProto_Options_field_fullname (line 264) | OneofDescriptorProto_Options_field_fullname protoreflect.FullName = "goo...
constant OneofDescriptorProto_Name_field_number (line 269) | OneofDescriptorProto_Name_field_number protoreflect.FieldNumber = 1
constant OneofDescriptorProto_Options_field_number (line 270) | OneofDescriptorProto_Options_field_number protoreflect.FieldNumber = 2
constant EnumDescriptorProto_message_name (line 275) | EnumDescriptorProto_message_name protoreflect.Name = "EnumDescri...
constant EnumDescriptorProto_message_fullname (line 276) | EnumDescriptorProto_message_fullname protoreflect.FullName = "google.pro...
constant EnumDescriptorProto_Name_field_name (line 281) | EnumDescriptorProto_Name_field_name protoreflect.Name = "name"
constant EnumDescriptorProto_Value_field_name (line 282) | EnumDescriptorProto_Value_field_name protoreflect.Name = "value"
constant EnumDescriptorProto_Options_field_name (line 283) | EnumDescriptorProto_Options_field_name protoreflect.Name = "options"
constant EnumDescriptorProto_ReservedRange_field_name (line 284) | EnumDescriptorProto_ReservedRange_field_name protoreflect.Name = "reserv...
constant EnumDescriptorProto_ReservedName_field_name (line 285) | EnumDescriptorProto_ReservedName_field_name protoreflect.Name = "reserv...
constant EnumDescriptorProto_Name_field_fullname (line 287) | EnumDescriptorProto_Name_field_fullname protoreflect.FullName =...
constant EnumDescriptorProto_Value_field_fullname (line 288) | EnumDescriptorProto_Value_field_fullname protoreflect.FullName =...
constant EnumDescriptorProto_Options_field_fullname (line 289) | EnumDescriptorProto_Options_field_fullname protoreflect.FullName =...
constant EnumDescriptorProto_ReservedRange_field_fullname (line 290) | EnumDescriptorProto_ReservedRange_field_fullname protoreflect.FullName =...
constant EnumDescriptorProto_ReservedName_field_fullname (line 291) | EnumDescriptorProto_ReservedName_field_fullname protoreflect.FullName =...
constant EnumDescriptorProto_Name_field_number (line 296) | EnumDescriptorProto_Name_field_number protoreflect.FieldNumber = 1
constant EnumDescriptorProto_Value_field_number (line 297) | EnumDescriptorProto_Value_field_number protoreflect.FieldNumber = 2
constant EnumDescriptorProto_Options_field_number (line 298) | EnumDescriptorProto_Options_field_number protoreflect.FieldNumber = 3
constant EnumDescriptorProto_ReservedRange_field_number (line 299) | EnumDescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 4
constant EnumDescriptorProto_ReservedName_field_number (line 300) | EnumDescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 5
constant EnumDescriptorProto_EnumReservedRange_message_name (line 305) | EnumDescriptorProto_EnumReservedRange_message_name protoreflect.Name...
constant EnumDescriptorProto_EnumReservedRange_message_fullname (line 306) | EnumDescriptorProto_EnumReservedRange_message_fullname protoreflect.Full...
constant EnumDescriptorProto_EnumReservedRange_Start_field_name (line 311) | EnumDescriptorProto_EnumReservedRange_Start_field_name protoreflect.Name...
constant EnumDescriptorProto_EnumReservedRange_End_field_name (line 312) | EnumDescriptorProto_EnumReservedRange_End_field_name protoreflect.Name...
constant EnumDescriptorProto_EnumReservedRange_Start_field_fullname (line 314) | EnumDescriptorProto_EnumReservedRange_Start_field_fullname protoreflect....
constant EnumDescriptorProto_EnumReservedRange_End_field_fullname (line 315) | EnumDescriptorProto_EnumReservedRange_End_field_fullname protoreflect....
constant EnumDescriptorProto_EnumReservedRange_Start_field_number (line 320) | EnumDescriptorProto_EnumReservedRange_Start_field_number protoreflect.Fi...
constant EnumDescriptorProto_EnumReservedRange_End_field_number (line 321) | EnumDescriptorProto_EnumReservedRange_End_field_number protoreflect.Fi...
constant EnumValueDescriptorProto_message_name (line 326) | EnumValueDescriptorProto_message_name protoreflect.Name = "EnumV...
constant EnumValueDescriptorProto_message_fullname (line 327) | EnumValueDescriptorProto_message_fullname protoreflect.FullName = "googl...
constant EnumValueDescriptorProto_Name_field_name (line 332) | EnumValueDescriptorProto_Name_field_name protoreflect.Name = "name"
constant EnumValueDescriptorProto_Number_field_name (line 333) | EnumValueDescriptorProto_Number_field_name protoreflect.Name = "number"
constant EnumValueDescriptorProto_Options_field_name (line 334) | EnumValueDescriptorProto_Options_field_name protoreflect.Name = "options"
constant EnumValueDescriptorProto_Name_field_fullname (line 336) | EnumValueDescriptorProto_Name_field_fullname protoreflect.FullName = ...
constant EnumValueDescriptorProto_Number_field_fullname (line 337) | EnumValueDescriptorProto_Number_field_fullname protoreflect.FullName = ...
constant EnumValueDescriptorProto_Options_field_fullname (line 338) | EnumValueDescriptorProto_Options_field_fullname protoreflect.FullName = ...
constant EnumValueDescriptorProto_Name_field_number (line 343) | EnumValueDescriptorProto_Name_field_number protoreflect.FieldNumber = 1
constant EnumValueDescriptorProto_Number_field_number (line 344) | EnumValueDescriptorProto_Number_field_number protoreflect.FieldNumber = 2
constant EnumValueDescriptorProto_Options_field_number (line 345) | EnumValueDescriptorProto_Options_field_number protoreflect.FieldNumber = 3
constant ServiceDescriptorProto_message_name (line 350) | ServiceDescriptorProto_message_name protoreflect.Name = "Service...
constant ServiceDescriptorProto_message_fullname (line 351) | ServiceDescriptorProto_message_fullname protoreflect.FullName = "google....
constant ServiceDescriptorProto_Name_field_name (line 356) | ServiceDescriptorProto_Name_field_name protoreflect.Name = "name"
constant ServiceDescriptorProto_Method_field_name (line 357) | ServiceDescriptorProto_Method_field_name protoreflect.Name = "method"
constant ServiceDescriptorProto_Options_field_name (line 358) | ServiceDescriptorProto_Options_field_name protoreflect.Name = "options"
constant ServiceDescriptorProto_Name_field_fullname (line 360) | ServiceDescriptorProto_Name_field_fullname protoreflect.FullName = "g...
constant ServiceDescriptorProto_Method_field_fullname (line 361) | ServiceDescriptorProto_Method_field_fullname protoreflect.FullName = "g...
constant ServiceDescriptorProto_Options_field_fullname (line 362) | ServiceDescriptorProto_Options_field_fullname protoreflect.FullName = "g...
constant ServiceDescriptorProto_Name_field_number (line 367) | ServiceDescriptorProto_Name_field_number protoreflect.FieldNumber = 1
constant ServiceDescriptorProto_Method_field_number (line 368) | ServiceDescriptorProto_Method_field_number protoreflect.FieldNumber = 2
constant ServiceDescriptorProto_Options_field_number (line 369) | ServiceDescriptorProto_Options_field_number protoreflect.FieldNumber = 3
constant MethodDescriptorProto_message_name (line 374) | MethodDescriptorProto_message_name protoreflect.Name = "MethodDe...
constant MethodDescriptorProto_message_fullname (line 375) | MethodDescriptorProto_message_fullname protoreflect.FullName = "google.p...
constant MethodDescriptorProto_Name_field_name (line 380) | MethodDescriptorProto_Name_field_name protoreflect.Name = "name"
constant MethodDescriptorProto_InputType_field_name (line 381) | MethodDescriptorProto_InputType_field_name protoreflect.Name = "in...
constant MethodDescriptorProto_OutputType_field_name (line 382) | MethodDescriptorProto_OutputType_field_name protoreflect.Name = "ou...
constant MethodDescriptorProto_Options_field_name (line 383) | MethodDescriptorProto_Options_field_name protoreflect.Name = "op...
constant MethodDescriptorProto_ClientStreaming_field_name (line 384) | MethodDescriptorProto_ClientStreaming_field_name protoreflect.Name = "cl...
constant MethodDescriptorProto_ServerStreaming_field_name (line 385) | MethodDescriptorProto_ServerStreaming_field_name protoreflect.Name = "se...
constant MethodDescriptorProto_Name_field_fullname (line 387) | MethodDescriptorProto_Name_field_fullname protoreflect.FullNa...
constant MethodDescriptorProto_InputType_field_fullname (line 388) | MethodDescriptorProto_InputType_field_fullname protoreflect.FullNa...
constant MethodDescriptorProto_OutputType_field_fullname (line 389) | MethodDescriptorProto_OutputType_field_fullname protoreflect.FullNa...
constant MethodDescriptorProto_Options_field_fullname (line 390) | MethodDescriptorProto_Options_field_fullname protoreflect.FullNa...
constant MethodDescriptorProto_ClientStreaming_field_fullname (line 391) | MethodDescriptorProto_ClientStreaming_field_fullname protoreflect.FullNa...
constant MethodDescriptorProto_ServerStreaming_field_fullname (line 392) | MethodDescriptorProto_ServerStreaming_field_fullname protoreflect.FullNa...
constant MethodDescriptorProto_Name_field_number (line 397) | MethodDescriptorProto_Name_field_number protoreflect.FieldNum...
constant MethodDescriptorProto_InputType_field_number (line 398) | MethodDescriptorProto_InputType_field_number protoreflect.FieldNum...
constant MethodDescriptorProto_OutputType_field_number (line 399) | MethodDescriptorProto_OutputType_field_number protoreflect.FieldNum...
constant MethodDescriptorProto_Options_field_number (line 400) | MethodDescriptorProto_Options_field_number protoreflect.FieldNum...
constant MethodDescriptorProto_ClientStreaming_field_number (line 401) | MethodDescriptorProto_ClientStreaming_field_number protoreflect.FieldNum...
constant MethodDescriptorProto_ServerStreaming_field_number (line 402) | MethodDescriptorProto_ServerStreaming_field_number protoreflect.FieldNum...
constant FileOptions_message_name (line 407) | FileOptions_message_name protoreflect.Name = "FileOptions"
constant FileOptions_message_fullname (line 408) | FileOptions_message_fullname protoreflect.FullName = "google.protobuf.Fi...
constant FileOptions_JavaPackage_field_name (line 413) | FileOptions_JavaPackage_field_name protoreflect.Name = "ja...
constant FileOptions_JavaOuterClassname_field_name (line 414) | FileOptions_JavaOuterClassname_field_name protoreflect.Name = "ja...
constant FileOptions_JavaMultipleFiles_field_name (line 415) | FileOptions_JavaMultipleFiles_field_name protoreflect.Name = "ja...
constant FileOptions_JavaGenerateEqualsAndHash_field_name (line 416) | FileOptions_JavaGenerateEqualsAndHash_field_name protoreflect.Name = "ja...
constant FileOptions_JavaStringCheckUtf8_field_name (line 417) | FileOptions_JavaStringCheckUtf8_field_name protoreflect.Name = "ja...
constant FileOptions_OptimizeFor_field_name (line 418) | FileOptions_OptimizeFor_field_name protoreflect.Name = "op...
constant FileOptions_GoPackage_field_name (line 419) | FileOptions_GoPackage_field_name protoreflect.Name = "go...
constant FileOptions_CcGenericServices_field_name (line 420) | FileOptions_CcGenericServices_field_name protoreflect.Name = "cc...
constant FileOptions_JavaGenericServices_field_name (line 421) | FileOptions_JavaGenericServices_field_name protoreflect.Name = "ja...
constant FileOptions_PyGenericServices_field_name (line 422) | FileOptions_PyGenericServices_field_name protoreflect.Name = "py...
constant FileOptions_PhpGenericServices_field_name (line 423) | FileOptions_PhpGenericServices_field_name protoreflect.Name = "ph...
constant FileOptions_Deprecated_field_name (line 424) | FileOptions_Deprecated_field_name protoreflect.Name = "de...
constant FileOptions_CcEnableArenas_field_name (line 425) | FileOptions_CcEnableArenas_field_name protoreflect.Name = "cc...
constant FileOptions_ObjcClassPrefix_field_name (line 426) | FileOptions_ObjcClassPrefix_field_name protoreflect.Name = "ob...
constant FileOptions_CsharpNamespace_field_name (line 427) | FileOptions_CsharpNamespace_field_name protoreflect.Name = "cs...
constant FileOptions_SwiftPrefix_field_name (line 428) | FileOptions_SwiftPrefix_field_name protoreflect.Name = "sw...
constant FileOptions_PhpClassPrefix_field_name (line 429) | FileOptions_PhpClassPrefix_field_name protoreflect.Name = "ph...
constant FileOptions_PhpNamespace_field_name (line 430) | FileOptions_PhpNamespace_field_name protoreflect.Name = "ph...
constant FileOptions_PhpMetadataNamespace_field_name (line 431) | FileOptions_PhpMetadataNamespace_field_name protoreflect.Name = "ph...
constant FileOptions_RubyPackage_field_name (line 432) | FileOptions_RubyPackage_field_name protoreflect.Name = "ru...
constant FileOptions_UninterpretedOption_field_name (line 433) | FileOptions_UninterpretedOption_field_name protoreflect.Name = "un...
constant FileOptions_JavaPackage_field_fullname (line 435) | FileOptions_JavaPackage_field_fullname protoreflect.FullNa...
constant FileOptions_JavaOuterClassname_field_fullname (line 436) | FileOptions_JavaOuterClassname_field_fullname protoreflect.FullNa...
constant FileOptions_JavaMultipleFiles_field_fullname (line 437) | FileOptions_JavaMultipleFiles_field_fullname protoreflect.FullNa...
constant FileOptions_JavaGenerateEqualsAndHash_field_fullname (line 438) | FileOptions_JavaGenerateEqualsAndHash_field_fullname protoreflect.FullNa...
constant FileOptions_JavaStringCheckUtf8_field_fullname (line 439) | FileOptions_JavaStringCheckUtf8_field_fullname protoreflect.FullNa...
constant FileOptions_OptimizeFor_field_fullname (line 440) | FileOptions_OptimizeFor_field_fullname protoreflect.FullNa...
constant FileOptions_GoPackage_field_fullname (line 441) | FileOptions_GoPackage_field_fullname protoreflect.FullNa...
constant FileOptions_CcGenericServices_field_fullname (line 442) | FileOptions_CcGenericServices_field_fullname protoreflect.FullNa...
constant FileOptions_JavaGenericServices_field_fullname (line 443) | FileOptions_JavaGenericServices_field_fullname protoreflect.FullNa...
constant FileOptions_PyGenericServices_field_fullname (line 444) | FileOptions_PyGenericServices_field_fullname protoreflect.FullNa...
constant FileOptions_PhpGenericServices_field_fullname (line 445) | FileOptions_PhpGenericServices_field_fullname protoreflect.FullNa...
constant FileOptions_Deprecated_field_fullname (line 446) | FileOptions_Deprecated_field_fullname protoreflect.FullNa...
constant FileOptions_CcEnableArenas_field_fullname (line 447) | FileOptions_CcEnableArenas_field_fullname protoreflect.FullNa...
constant FileOptions_ObjcClassPrefix_field_fullname (line 448) | FileOptions_ObjcClassPrefix_field_fullname protoreflect.FullNa...
constant FileOptions_CsharpNamespace_field_fullname (line 449) | FileOptions_CsharpNamespace_field_fullname protoreflect.FullNa...
constant FileOptions_SwiftPrefix_field_fullname (line 450) | FileOptions_SwiftPrefix_field_fullname protoreflect.FullNa...
constant FileOptions_PhpClassPrefix_field_fullname (line 451) | FileOptions_PhpClassPrefix_field_fullname protoreflect.FullNa...
constant FileOptions_PhpNamespace_field_fullname (line 452) | FileOptions_PhpNamespace_field_fullname protoreflect.FullNa...
constant FileOptions_PhpMetadataNamespace_field_fullname (line 453) | FileOptions_PhpMetadataNamespace_field_fullname protoreflect.FullNa...
constant FileOptions_RubyPackage_field_fullname (line 454) | FileOptions_RubyPackage_field_fullname protoreflect.FullNa...
constant FileOptions_UninterpretedOption_field_fullname (line 455) | FileOptions_UninterpretedOption_field_fullname protoreflect.FullNa...
constant FileOptions_JavaPackage_field_number (line 460) | FileOptions_JavaPackage_field_number protoreflect.FieldNum...
constant FileOptions_JavaOuterClassname_field_number (line 461) | FileOptions_JavaOuterClassname_field_number protoreflect.FieldNum...
constant FileOptions_JavaMultipleFiles_field_number (line 462) | FileOptions_JavaMultipleFiles_field_number protoreflect.FieldNum...
constant FileOptions_JavaGenerateEqualsAndHash_field_number (line 463) | FileOptions_JavaGenerateEqualsAndHash_field_number protoreflect.FieldNum...
constant FileOptions_JavaStringCheckUtf8_field_number (line 464) | FileOptions_JavaStringCheckUtf8_field_number protoreflect.FieldNum...
constant FileOptions_OptimizeFor_field_number (line 465) | FileOptions_OptimizeFor_field_number protoreflect.FieldNum...
constant FileOptions_GoPackage_field_number (line 466) | FileOptions_GoPackage_field_number protoreflect.FieldNum...
constant FileOptions_CcGenericServices_field_number (line 467) | FileOptions_CcGenericServices_field_number protoreflect.FieldNum...
constant FileOptions_JavaGenericServices_field_number (line 468) | FileOptions_JavaGenericServices_field_number protoreflect.FieldNum...
constant FileOptions_PyGenericServices_field_number (line 469) | FileOptions_PyGenericServices_field_number protoreflect.FieldNum...
constant FileOptions_PhpGenericServices_field_number (line 470) | FileOptions_PhpGenericServices_field_number protoreflect.FieldNum...
constant FileOptions_Deprecated_field_number (line 471) | FileOptions_Deprecated_field_number protoreflect.FieldNum...
constant FileOptions_CcEnableArenas_field_number (line 472) | FileOptions_CcEnableArenas_field_number protoreflect.FieldNum...
constant FileOptions_ObjcClassPrefix_field_number (line 473) | FileOptions_ObjcClassPrefix_field_number protoreflect.FieldNum...
constant FileOptions_CsharpNamespace_field_number (line 474) | FileOptions_CsharpNamespace_field_number protoreflect.FieldNum...
constant FileOptions_SwiftPrefix_field_number (line 475) | FileOptions_SwiftPrefix_field_number protoreflect.FieldNum...
constant FileOptions_PhpClassPrefix_field_number (line 476) | FileOptions_PhpClassPrefix_field_number protoreflect.FieldNum...
constant FileOptions_PhpNamespace_field_number (line 477) | FileOptions_PhpNamespace_field_number protoreflect.FieldNum...
constant FileOptions_PhpMetadataNamespace_field_number (line 478) | FileOptions_PhpMetadataNamespace_field_number protoreflect.FieldNum...
constant FileOptions_RubyPackage_field_number (line 479) | FileOptions_RubyPackage_field_number protoreflect.FieldNum...
constant FileOptions_UninterpretedOption_field_number (line 480) | FileOptions_UninterpretedOption_field_number protoreflect.FieldNum...
constant FileOptions_OptimizeMode_enum_fullname (line 485) | FileOptions_OptimizeMode_enum_fullname = "google.protobuf.FileOptions.Op...
constant FileOptions_OptimizeMode_enum_name (line 486) | FileOptions_OptimizeMode_enum_name = "OptimizeMode"
constant MessageOptions_message_name (line 491) | MessageOptions_message_name protoreflect.Name = "MessageOptions"
constant MessageOptions_message_fullname (line 492) | MessageOptions_message_fullname protoreflect.FullName = "google.protobuf...
constant MessageOptions_MessageSetWireFormat_field_name (line 497) | MessageOptions_MessageSetWireFormat_field_name protoreflect.Name...
constant MessageOptions_NoStandardDescriptorAccessor_field_name (line 498) | MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name...
constant MessageOptions_Deprecated_field_name (line 499) | MessageOptions_Deprecated_field_name protoreflect.Name...
constant MessageOptions_MapEntry_field_name (line 500) | MessageOptions_MapEntry_field_name protoreflect.Name...
constant MessageOptions_UninterpretedOption_field_name (line 501) | MessageOptions_UninterpretedOption_field_name protoreflect.Name...
constant MessageOptions_MessageSetWireFormat_field_fullname (line 503) | MessageOptions_MessageSetWireFormat_field_fullname protoreflect....
constant MessageOptions_NoStandardDescriptorAccessor_field_fullname (line 504) | MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect....
constant MessageOptions_Deprecated_field_fullname (line 505) | MessageOptions_Deprecated_field_fullname protoreflect....
constant MessageOptions_MapEntry_field_fullname (line 506) | MessageOptions_MapEntry_field_fullname protoreflect....
constant MessageOptions_UninterpretedOption_field_fullname (line 507) | MessageOptions_UninterpretedOption_field_fullname protoreflect....
constant MessageOptions_MessageSetWireFormat_field_number (line 512) | MessageOptions_MessageSetWireFormat_field_number protoreflect.Fi...
constant MessageOptions_NoStandardDescriptorAccessor_field_number (line 513) | MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.Fi...
constant MessageOptions_Deprecated_field_number (line 514) | MessageOptions_Deprecated_field_number protoreflect.Fi...
constant MessageOptions_MapEntry_field_number (line 515) | MessageOptions_MapEntry_field_number protoreflect.Fi...
constant MessageOptions_UninterpretedOption_field_number (line 516) | MessageOptions_UninterpretedOption_field_number protoreflect.Fi...
constant FieldOptions_message_name (line 521) | FieldOptions_message_name protoreflect.Name = "FieldOptions"
constant FieldOptions_message_fullname (line 522) | FieldOptions_message_fullname protoreflect.FullName = "google.protobuf.F...
constant FieldOptions_Ctype_field_name (line 527) | FieldOptions_Ctype_field_name protoreflect.Name = "ctype"
constant FieldOptions_Packed_field_name (line 528) | FieldOptions_Packed_field_name protoreflect.Name = "packed"
constant FieldOptions_Jstype_field_name (line 529) | FieldOptions_Jstype_field_name protoreflect.Name = "jstype"
constant FieldOptions_Lazy_field_name (line 530) | FieldOptions_Lazy_field_name protoreflect.Name = "lazy"
constant FieldOptions_Deprecated_field_name (line 531) | FieldOptions_Deprecated_field_name protoreflect.Name = "depreca...
constant FieldOptions_Weak_field_name (line 532) | FieldOptions_Weak_field_name protoreflect.Name = "weak"
constant FieldOptions_UninterpretedOption_field_name (line 533) | FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninter...
constant FieldOptions_Ctype_field_fullname (line 535) | FieldOptions_Ctype_field_fullname protoreflect.FullName = ...
constant FieldOptions_Packed_field_fullname (line 536) | FieldOptions_Packed_field_fullname protoreflect.FullName = ...
constant FieldOptions_Jstype_field_fullname (line 537) | FieldOptions_Jstype_field_fullname protoreflect.FullName = ...
constant FieldOptions_Lazy_field_fullname (line 538) | FieldOptions_Lazy_field_fullname protoreflect.FullName = ...
constant FieldOptions_Deprecated_field_fullname (line 539) | FieldOptions_Deprecated_field_fullname protoreflect.FullName = ...
constant FieldOptions_Weak_field_fullname (line 540) | FieldOptions_Weak_field_fullname protoreflect.FullName = ...
constant FieldOptions_UninterpretedOption_field_fullname (line 541) | FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = ...
constant FieldOptions_Ctype_field_number (line 546) | FieldOptions_Ctype_field_number protoreflect.FieldNumber = 1
constant FieldOptions_Packed_field_number (line 547) | FieldOptions_Packed_field_number protoreflect.FieldNumber = 2
constant FieldOptions_Jstype_field_number (line 548) | FieldOptions_Jstype_field_number protoreflect.FieldNumber = 6
constant FieldOptions_Lazy_field_number (line 549) | FieldOptions_Lazy_field_number protoreflect.FieldNumber = 5
constant FieldOptions_Deprecated_field_number (line 550) | FieldOptions_Deprecated_field_number protoreflect.FieldNumber = 3
constant FieldOptions_Weak_field_number (line 551) | FieldOptions_Weak_field_number protoreflect.FieldNumber = 10
constant FieldOptions_UninterpretedOption_field_number (line 552) | FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber =...
constant FieldOptions_CType_enum_fullname (line 557) | FieldOptions_CType_enum_fullname = "google.protobuf.FieldOptions.CType"
constant FieldOptions_CType_enum_name (line 558) | FieldOptions_CType_enum_name = "CType"
constant FieldOptions_JSType_enum_fullname (line 563) | FieldOptions_JSType_enum_fullname = "google.protobuf.FieldOptions.JSType"
constant FieldOptions_JSType_enum_name (line 564) | FieldOptions_JSType_enum_name = "JSType"
constant OneofOptions_message_name (line 569) | OneofOptions_message_name protoreflect.Name = "OneofOptions"
constant OneofOptions_message_fullname (line 570) | OneofOptions_message_fullname protoreflect.FullName = "google.protobuf.O...
constant OneofOptions_UninterpretedOption_field_name (line 575) | OneofOptions_UninterpretedOption_field_name protoreflect.Name = "uninter...
constant OneofOptions_UninterpretedOption_field_fullname (line 577) | OneofOptions_UninterpretedOption_field_fullname protoreflect.FullName = ...
constant OneofOptions_UninterpretedOption_field_number (line 582) | OneofOptions_UninterpretedOption_field_number protoreflect.FieldNumber =...
constant EnumOptions_message_name (line 587) | EnumOptions_message_name protoreflect.Name = "EnumOptions"
constant EnumOptions_message_fullname (line 588) | EnumOptions_message_fullname protoreflect.FullName = "google.protobuf.En...
constant EnumOptions_AllowAlias_field_name (line 593) | EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_al...
constant EnumOptions_Deprecated_field_name (line 594) | EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated"
constant EnumOptions_UninterpretedOption_field_name (line 595) | EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterp...
constant EnumOptions_AllowAlias_field_fullname (line 597) | EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "...
constant EnumOptions_Deprecated_field_fullname (line 598) | EnumOptions_Deprecated_field_fullname protoreflect.FullName = "...
constant EnumOptions_UninterpretedOption_field_fullname (line 599) | EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "...
constant EnumOptions_AllowAlias_field_number (line 604) | EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2
constant EnumOptions_Deprecated_field_number (line 605) | EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3
constant EnumOptions_UninterpretedOption_field_number (line 606) | EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
constant EnumValueOptions_message_name (line 611) | EnumValueOptions_message_name protoreflect.Name = "EnumValueOpti...
constant EnumValueOptions_message_fullname (line 612) | EnumValueOptions_message_fullname protoreflect.FullName = "google.protob...
constant EnumValueOptions_Deprecated_field_name (line 617) | EnumValueOptions_Deprecated_field_name protoreflect.Name = "dep...
constant EnumValueOptions_UninterpretedOption_field_name (line 618) | EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uni...
constant EnumValueOptions_Deprecated_field_fullname (line 620) | EnumValueOptions_Deprecated_field_fullname protoreflect.FullNam...
constant EnumValueOptions_UninterpretedOption_field_fullname (line 621) | EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullNam...
constant EnumValueOptions_Deprecated_field_number (line 626) | EnumValueOptions_Deprecated_field_number protoreflect.FieldNumb...
constant EnumValueOptions_UninterpretedOption_field_number (line 627) | EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumb...
constant ServiceOptions_message_name (line 632) | ServiceOptions_message_name protoreflect.Name = "ServiceOptions"
constant ServiceOptions_message_fullname (line 633) | ServiceOptions_message_fullname protoreflect.FullName = "google.protobuf...
constant ServiceOptions_Deprecated_field_name (line 638) | ServiceOptions_Deprecated_field_name protoreflect.Name = "depre...
constant ServiceOptions_UninterpretedOption_field_name (line 639) | ServiceOptions_UninterpretedOption_field_name protoreflect.Name = "unint...
constant ServiceOptions_Deprecated_field_fullname (line 641) | ServiceOptions_Deprecated_field_fullname protoreflect.FullName ...
constant ServiceOptions_UninterpretedOption_field_fullname (line 642) | ServiceOptions_UninterpretedOption_field_fullname protoreflect.FullName ...
constant ServiceOptions_Deprecated_field_number (line 647) | ServiceOptions_Deprecated_field_number protoreflect.FieldNumber...
constant ServiceOptions_UninterpretedOption_field_number (line 648) | ServiceOptions_UninterpretedOption_field_number protoreflect.FieldNumber...
constant MethodOptions_message_name (line 653) | MethodOptions_message_name protoreflect.Name = "MethodOptions"
constant MethodOptions_message_fullname (line 654) | MethodOptions_message_fullname protoreflect.FullName = "google.protobuf....
constant MethodOptions_Deprecated_field_name (line 659) | MethodOptions_Deprecated_field_name protoreflect.Name = "deprec...
constant MethodOptions_IdempotencyLevel_field_name (line 660) | MethodOptions_IdempotencyLevel_field_name protoreflect.Name = "idempo...
constant MethodOptions_UninterpretedOption_field_name (line 661) | MethodOptions_UninterpretedOption_field_name protoreflect.Name = "uninte...
constant MethodOptions_Deprecated_field_fullname (line 663) | MethodOptions_Deprecated_field_fullname protoreflect.FullName =...
constant MethodOptions_IdempotencyLevel_field_fullname (line 664) | MethodOptions_IdempotencyLevel_field_fullname protoreflect.FullName =...
constant MethodOptions_UninterpretedOption_field_fullname (line 665) | MethodOptions_UninterpretedOption_field_fullname protoreflect.FullName =...
constant MethodOptions_Deprecated_field_number (line 670) | MethodOptions_Deprecated_field_number protoreflect.FieldNumber ...
constant MethodOptions_IdempotencyLevel_field_number (line 671) | MethodOptions_IdempotencyLevel_field_number protoreflect.FieldNumber ...
constant MethodOptions_UninterpretedOption_field_number (line 672) | MethodOptions_UninterpretedOption_field_number protoreflect.FieldNumber ...
constant MethodOptions_IdempotencyLevel_enum_fullname (line 677) | MethodOptions_IdempotencyLevel_enum_fullname = "google.protobuf.MethodOp...
constant MethodOptions_IdempotencyLevel_enum_name (line 678) | MethodOptions_IdempotencyLevel_enum_name = "IdempotencyLevel"
constant UninterpretedOption_message_name (line 683) | UninterpretedOption_message_name protoreflect.Name = "Uninterpre...
constant UninterpretedOption_message_fullname (line 684) | UninterpretedOption_message_fullname protoreflect.FullName = "google.pro...
constant UninterpretedOption_Name_field_name (line 689) | UninterpretedOption_Name_field_name protoreflect.Name = "name"
constant UninterpretedOption_IdentifierValue_field_name (line 690) | UninterpretedOption_IdentifierValue_field_name protoreflect.Name = "ide...
constant UninterpretedOption_PositiveIntValue_field_name (line 691) | UninterpretedOption_PositiveIntValue_field_name protoreflect.Name = "pos...
constant UninterpretedOption_NegativeIntValue_field_name (line 692) | UninterpretedOption_NegativeIntValue_field_name protoreflect.Name = "neg...
constant UninterpretedOption_DoubleValue_field_name (line 693) | UninterpretedOption_DoubleValue_field_name protoreflect.Name = "dou...
constant UninterpretedOption_StringValue_field_name (line 694) | UninterpretedOption_StringValue_field_name protoreflect.Name = "str...
constant UninterpretedOption_AggregateValue_field_name (line 695) | UninterpretedOption_AggregateValue_field_name protoreflect.Name = "agg...
constant UninterpretedOption_Name_field_fullname (line 697) | UninterpretedOption_Name_field_fullname protoreflect.FullNam...
constant UninterpretedOption_IdentifierValue_field_fullname (line 698) | UninterpretedOption_IdentifierValue_field_fullname protoreflect.FullNam...
constant UninterpretedOption_PositiveIntValue_field_fullname (line 699) | UninterpretedOption_PositiveIntValue_field_fullname protoreflect.FullNam...
constant UninterpretedOption_NegativeIntValue_field_fullname (line 700) | UninterpretedOption_NegativeIntValue_field_fullname protoreflect.FullNam...
constant UninterpretedOption_DoubleValue_field_fullname (line 701) | UninterpretedOption_DoubleValue_field_fullname protoreflect.FullNam...
constant UninterpretedOption_StringValue_field_fullname (line 702) | UninterpretedOption_StringValue_field_fullname protoreflect.FullNam...
constant UninterpretedOption_AggregateValue_field_fullname (line 703) | UninterpretedOption_AggregateValue_field_fullname protoreflect.FullNam...
constant UninterpretedOption_Name_field_number (line 708) | UninterpretedOption_Name_field_number protoreflect.FieldNumb...
constant UninterpretedOption_IdentifierValue_field_number (line 709) | UninterpretedOption_IdentifierValue_field_number protoreflect.FieldNumb...
constant UninterpretedOption_PositiveIntValue_field_number (line 710) | UninterpretedOption_PositiveIntValue_field_number protoreflect.FieldNumb...
constant UninterpretedOption_NegativeIntValue_field_number (line 711) | UninterpretedOption_NegativeIntValue_field_number protoreflect.FieldNumb...
constant UninterpretedOption_DoubleValue_field_number (line 712) | UninterpretedOption_DoubleValue_field_number protoreflect.FieldNumb...
constant UninterpretedOption_StringValue_field_number (line 713) | UninterpretedOption_StringValue_field_number protoreflect.FieldNumb...
constant UninterpretedOption_AggregateValue_field_number (line 714) | UninterpretedOption_AggregateValue_field_number protoreflect.FieldNumb...
constant UninterpretedOption_NamePart_message_name (line 719) | UninterpretedOption_NamePart_message_name protoreflect.Name = "N...
constant UninterpretedOption_NamePart_message_fullname (line 720) | UninterpretedOption_NamePart_message_fullname protoreflect.FullName = "g...
constant UninterpretedOption_NamePart_NamePart_field_name (line 725) | UninterpretedOption_NamePart_NamePart_field_name protoreflect.Name = ...
constant UninterpretedOption_NamePart_IsExtension_field_name (line 726) | UninterpretedOption_NamePart_IsExtension_field_name protoreflect.Name = ...
constant UninterpretedOption_NamePart_NamePart_field_fullname (line 728) | UninterpretedOption_NamePart_NamePart_field_fullname protoreflect.Ful...
constant UninterpretedOption_NamePart_IsExtension_field_fullname (line 729) | UninterpretedOption_NamePart_IsExtension_field_fullname protoreflect.Ful...
constant UninterpretedOption_NamePart_NamePart_field_number (line 734) | UninterpretedOption_NamePart_NamePart_field_number protoreflect.Field...
constant UninterpretedOption_NamePart_IsExtension_field_number (line 735) | UninterpretedOption_NamePart_IsExtension_field_number protoreflect.Field...
constant SourceCodeInfo_message_name (line 740) | SourceCodeInfo_message_name protoreflect.Name = "SourceCodeInfo"
constant SourceCodeInfo_message_fullname (line 741) | SourceCodeInfo_message_fullname protoreflect.FullName = "google.protobuf...
constant SourceCodeInfo_Location_field_name (line 746) | SourceCodeInfo_Location_field_name protoreflect.Name = "location"
constant SourceCodeInfo_Location_field_fullname (line 748) | SourceCodeInfo_Location_field_fullname protoreflect.FullName = "google.p...
constant SourceCodeInfo_Location_field_number (line 753) | SourceCodeInfo_Location_field_number protoreflect.FieldNumber = 1
constant SourceCodeInfo_Location_message_name (line 758) | SourceCodeInfo_Location_message_name protoreflect.Name = "Location"
constant SourceCodeInfo_Location_message_fullname (line 759) | SourceCodeInfo_Location_message_fullname protoreflect.FullName = "google...
constant SourceCodeInfo_Location_Path_field_name (line 764) | SourceCodeInfo_Location_Path_field_name protoreflect....
constant SourceCodeInfo_Location_Span_field_name (line 765) | SourceCodeInfo_Location_Span_field_name protoreflect....
constant SourceCodeInfo_Location_LeadingComments_field_name (line 766) | SourceCodeInfo_Location_LeadingComments_field_name protoreflect....
constant SourceCodeInfo_Location_TrailingComments_field_name (line 767) | SourceCodeInfo_Location_TrailingComments_field_name protoreflect....
constant SourceCodeInfo_Location_LeadingDetachedComments_field_name (line 768) | SourceCodeInfo_Location_LeadingDetachedComments_field_name protoreflect....
constant SourceCodeInfo_Location_Path_field_fullname (line 770) | SourceCodeInfo_Location_Path_field_fullname protorefl...
constant SourceCodeInfo_Location_Span_field_fullname (line 771) | SourceCodeInfo_Location_Span_field_fullname protorefl...
constant SourceCodeInfo_Location_LeadingComments_field_fullname (line 772) | SourceCodeInfo_Location_LeadingComments_field_fullname protorefl...
constant SourceCodeInfo_Location_TrailingComments_field_fullname (line 773) | SourceCodeInfo_Location_TrailingComments_field_fullname protorefl...
constant SourceCodeInfo_Location_LeadingDetachedComments_field_fullname (line 774) | SourceCodeInfo_Location_LeadingDetachedComments_field_fullname protorefl...
constant SourceCodeInfo_Location_Path_field_number (line 779) | SourceCodeInfo_Location_Path_field_number protoreflec...
constant SourceCodeInfo_Location_Span_field_number (line 780) | SourceCodeInfo_Location_Span_field_number protoreflec...
constant SourceCodeInfo_Location_LeadingComments_field_number (line 781) | SourceCodeInfo_Location_LeadingComments_field_number protoreflec...
constant SourceCodeInfo_Location_TrailingComments_field_number (line 782) | SourceCodeInfo_Location_TrailingComments_field_number protoreflec...
constant SourceCodeInfo_Location_LeadingDetachedComments_field_number (line 783) | SourceCodeInfo_Location_LeadingDetachedComments_field_number protoreflec...
constant GeneratedCodeInfo_message_name (line 788) | GeneratedCodeInfo_message_name protoreflect.Name = "GeneratedCod...
constant GeneratedCodeInfo_message_fullname (line 789) | GeneratedCodeInfo_message_fullname protoreflect.FullName = "google.proto...
constant GeneratedCodeInfo_Annotation_field_name (line 794) | GeneratedCodeInfo_Annotation_field_name protoreflect.Name = "annotation"
constant GeneratedCodeInfo_Annotation_field_fullname (line 796) | GeneratedCodeInfo_Annotation_field_fullname protoreflect.FullName = "goo...
constant GeneratedCodeInfo_Annotation_field_number (line 801) | GeneratedCodeInfo_Annotation_field_number protoreflect.FieldNumber = 1
constant GeneratedCodeInfo_Annotation_message_name (line 806) | GeneratedCodeInfo_Annotation_message_name protoreflect.Name = "A...
constant GeneratedCodeInfo_Annotation_message_fullname (line 807) | GeneratedCodeInfo_Annotation_message_fullname protoreflect.FullName = "g...
constant GeneratedCodeInfo_Annotation_Path_field_name (line 812) | GeneratedCodeInfo_Annotation_Path_field_name protoreflect.Name = "...
constant GeneratedCodeInfo_Annotation_SourceFile_field_name (line 813) | GeneratedCodeInfo_Annotation_SourceFile_field_name protoreflect.Name = "...
constant GeneratedCodeInfo_Annotation_Begin_field_name (line 814) | GeneratedCodeInfo_Annotation_Begin_field_name protoreflect.Name = "...
constant GeneratedCodeInfo_Annotation_End_field_name (line 815) | GeneratedCodeInfo_Annotation_End_field_name protoreflect.Name = "...
constant GeneratedCodeInfo_Annotation_Path_field_fullname (line 817) | GeneratedCodeInfo_Annotation_Path_field_fullname protoreflect.Full...
constant GeneratedCodeInfo_Annotation_SourceFile_field_fullname (line 818) | GeneratedCodeInfo_Annotation_SourceFile_field_fullname protoreflect.Full...
constant GeneratedCodeInfo_Annotation_Begin_field_fullname (line 819) | GeneratedCodeInfo_Annotation_Begin_field_fullname protoreflect.Full...
constant GeneratedCodeInfo_Annotation_End_field_fullname (line 820) | GeneratedCodeInfo_Annotation_End_field_fullname protoreflect.Full...
constant GeneratedCodeInfo_Annotation_Path_field_number (line 825) | GeneratedCodeInfo_Annotation_Path_field_number protoreflect.FieldN...
constant GeneratedCodeInfo_Annotation_SourceFile_field_number (line 826) | GeneratedCodeInfo_Annotation_SourceFile_field_number protoreflect.FieldN...
constant GeneratedCodeInfo_Annotation_Begin_field_number (line 827) | GeneratedCodeInfo_Annotation_Begin_field_number protoreflect.FieldN...
constant GeneratedCodeInfo_Annotation_End_field_number (line 828) | GeneratedCodeInfo_Annotation_End_field_number protoreflect.FieldN...
FILE: _tools/src/google.golang.org/protobuf/internal/genid/doc.go
constant GoogleProtobuf_package (line 11) | GoogleProtobuf_package protoreflect.FullName = "google.protobuf"
FILE: _tools/src/google.golang.org/protobuf/internal/genid/duration_gen.go
constant File_google_protobuf_duration_proto (line 13) | File_google_protobuf_duration_proto = "google/protobuf/duration.proto"
constant Duration_message_name (line 17) | Duration_message_name protoreflect.Name = "Duration"
constant Duration_message_fullname (line 18) | Duration_message_fullname protoreflect.FullName = "google.protobuf.Durat...
constant Duration_Seconds_field_name (line 23) | Duration_Seconds_field_name protoreflect.Name = "seconds"
constant Duration_Nanos_field_name (line 24) | Duration_Nanos_field_name protoreflect.Name = "nanos"
constant Duration_Seconds_field_fullname (line 26) | Duration_Seconds_field_fullname protoreflect.FullName = "google.protobuf...
constant Duration_Nanos_field_fullname (line 27) | Duration_Nanos_field_fullname protoreflect.FullName = "google.protobuf...
constant Duration_Seconds_field_number (line 32) | Duration_Seconds_field_number protoreflect.FieldNumber = 1
constant Duration_Nanos_field_number (line 33) | Duration_Nanos_field_number protoreflect.FieldNumber = 2
FILE: _tools/src/google.golang.org/protobuf/internal/genid/empty_gen.go
constant File_google_protobuf_empty_proto (line 13) | File_google_protobuf_empty_proto = "google/protobuf/empty.proto"
constant Empty_message_name (line 17) | Empty_message_name protoreflect.Name = "Empty"
constant Empty_message_fullname (line 18) | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty"
FILE: _tools/src/google.golang.org/protobuf/internal/genid/field_mask_gen.go
constant File_google_protobuf_field_mask_proto (line 13) | File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto"
constant FieldMask_message_name (line 17) | FieldMask_message_name protoreflect.Name = "FieldMask"
constant FieldMask_message_fullname (line 18) | FieldMask_message_fullname protoreflect.FullName = "google.protobuf.Fiel...
constant FieldMask_Paths_field_name (line 23) | FieldMask_Paths_field_name protoreflect.Name = "paths"
constant FieldMask_Paths_field_fullname (line 25) | FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf....
constant FieldMask_Paths_field_number (line 30) | FieldMask_Paths_field_number protoreflect.FieldNumber = 1
FILE: _tools/src/google.golang.org/protobuf/internal/genid/goname.go
constant State_goname (line 9) | State_goname = "state"
constant SizeCache_goname (line 11) | SizeCache_goname = "sizeCache"
constant SizeCacheA_goname (line 12) | SizeCacheA_goname = "XXX_sizecache"
constant WeakFields_goname (line 14) | WeakFields_goname = "weakFields"
constant WeakFieldsA_goname (line 15) | WeakFieldsA_goname = "XXX_weak"
constant UnknownFields_goname (line 17) | UnknownFields_goname = "unknownFields"
constant UnknownFieldsA_goname (line 18) | UnknownFieldsA_goname = "XXX_unrecognized"
constant ExtensionFields_goname (line 20) | ExtensionFields_goname = "extensionFields"
constant ExtensionFieldsA_goname (line 21) | ExtensionFieldsA_goname = "XXX_InternalExtensions"
constant ExtensionFieldsB_goname (line 22) | ExtensionFieldsB_goname = "XXX_extensions"
constant WeakFieldPrefix_goname (line 24) | WeakFieldPrefix_goname = "XXX_weak_"
FILE: _tools/src/google.golang.org/protobuf/internal/genid/map_entry.go
constant MapEntry_Key_field_name (line 11) | MapEntry_Key_field_name protoreflect.Name = "key"
constant MapEntry_Value_field_name (line 12) | MapEntry_Value_field_name protoreflect.Name = "value"
constant MapEntry_Key_field_number (line 14) | MapEntry_Key_field_number protoreflect.FieldNumber = 1
constant MapEntry_Value_field_number (line 15) | MapEntry_Value_field_number protoreflect.FieldNumber = 2
FILE: _tools/src/google.golang.org/protobuf/internal/genid/source_context_gen.go
constant File_google_protobuf_source_context_proto (line 13) | File_google_protobuf_source_context_proto = "google/protobuf/source_cont...
constant SourceContext_message_name (line 17) | SourceContext_message_name protoreflect.Name = "SourceContext"
constant SourceContext_message_fullname (line 18) | SourceContext_message_fullname protoreflect.FullName = "google.protobuf....
constant SourceContext_FileName_field_name (line 23) | SourceContext_FileName_field_name protoreflect.Name = "file_name"
constant SourceContext_FileName_field_fullname (line 25) | SourceContext_FileName_field_fullname protoreflect.FullName = "google.pr...
constant SourceContext_FileName_field_number (line 30) | SourceContext_FileName_field_number protoreflect.FieldNumber = 1
FILE: _tools/src/google.golang.org/protobuf/internal/genid/struct_gen.go
constant File_google_protobuf_struct_proto (line 13) | File_google_protobuf_struct_proto = "google/protobuf/struct.proto"
constant NullValue_enum_fullname (line 17) | NullValue_enum_fullname = "google.protobuf.NullValue"
constant NullValue_enum_name (line 18) | NullValue_enum_name = "NullValue"
constant Struct_message_name (line 23) | Struct_message_name protoreflect.Name = "Struct"
constant Struct_message_fullname (line 24) | Struct_message_fullname protoreflect.FullName = "google.protobuf.Struct"
constant Struct_Fields_field_name (line 29) | Struct_Fields_field_name protoreflect.Name = "fields"
constant Struct_Fields_field_fullname (line 31) | Struct_Fields_field_fullname protoreflect.FullName = "google.protobuf.St...
constant Struct_Fields_field_number (line 36) | Struct_Fields_field_number protoreflect.FieldNumber = 1
constant Struct_FieldsEntry_message_name (line 41) | Struct_FieldsEntry_message_name protoreflect.Name = "FieldsEntry"
constant Struct_FieldsEntry_message_fullname (line 42) | Struct_FieldsEntry_message_fullname protoreflect.FullName = "google.prot...
constant Struct_FieldsEntry_Key_field_name (line 47) | Struct_FieldsEntry_Key_field_name protoreflect.Name = "key"
constant Struct_FieldsEntry_Value_field_name (line 48) | Struct_FieldsEntry_Value_field_name protoreflect.Name = "value"
constant Struct_FieldsEntry_Key_field_fullname (line 50) | Struct_FieldsEntry_Key_field_fullname protoreflect.FullName = "google....
constant Struct_FieldsEntry_Value_field_fullname (line 51) | Struct_FieldsEntry_Value_field_fullname protoreflect.FullName = "google....
constant Struct_FieldsEntry_Key_field_number (line 56) | Struct_FieldsEntry_Key_field_number protoreflect.FieldNumber = 1
constant Struct_FieldsEntry_Value_field_number (line 57) | Struct_FieldsEntry_Value_field_number protoreflect.FieldNumber = 2
constant Value_message_name (line 62) | Value_message_name protoreflect.Name = "Value"
constant Value_message_fullname (line 63) | Value_message_fullname protoreflect.FullName = "google.protobuf.Value"
constant Value_NullValue_field_name (line 68) | Value_NullValue_field_name protoreflect.Name = "null_value"
constant Value_NumberValue_field_name (line 69) | Value_NumberValue_field_name protoreflect.Name = "number_value"
constant Value_StringValue_field_name (line 70) | Value_StringValue_field_name protoreflect.Name = "string_value"
constant Value_BoolValue_field_name (line 71) | Value_BoolValue_field_name protoreflect.Name = "bool_value"
constant Value_StructValue_field_name (line 72) | Value_StructValue_field_name protoreflect.Name = "struct_value"
constant Value_ListValue_field_name (line 73) | Value_ListValue_field_name protoreflect.Name = "list_value"
constant Value_NullValue_field_fullname (line 75) | Value_NullValue_field_fullname protoreflect.FullName = "google.protobu...
constant Value_NumberValue_field_fullname (line 76) | Value_NumberValue_field_fullname protoreflect.FullName = "google.protobu...
constant Value_StringValue_field_fullname (line 77) | Value_StringValue_field_fullname protoreflect.FullName = "google.protobu...
constant Value_BoolValue_field_fullname (line 78) | Value_BoolValue_field_fullname protoreflect.FullName = "google.protobu...
constant Value_StructValue_field_fullname (line 79) | Value_StructValue_field_fullname protoreflect.FullName = "google.protobu...
constant Value_ListValue_field_fullname (line 80) | Value_ListValue_field_fullname protoreflect.FullName = "google.protobu...
constant Value_NullValue_field_number (line 85) | Value_NullValue_field_number protoreflect.FieldNumber = 1
constant Value_NumberValue_field_number (line 86) | Value_NumberValue_field_number protoreflect.FieldNumber = 2
constant Value_StringValue_field_number (line 87) | Value_StringValue_field_number protoreflect.FieldNumber = 3
constant Value_BoolValue_field_number (line 88) | Value_BoolValue_field_number protoreflect.FieldNumber = 4
constant Value_StructValue_field_number (line 89) | Value_StructValue_field_number protoreflect.FieldNumber = 5
constant Value_ListValue_field_number (line 90) | Value_ListValue_field_number protoreflect.FieldNumber = 6
constant Value_Kind_oneof_name (line 95) | Value_Kind_oneof_name protoreflect.Name = "kind"
constant Value_Kind_oneof_fullname (line 97) | Value_Kind_oneof_fullname protoreflect.FullName = "google.protobuf.Value...
constant ListValue_message_name (line 102) | ListValue_message_name protoreflect.Name = "ListValue"
constant ListValue_message_fullname (line 103) | ListValue_message_fullname protoreflect.FullName = "google.protobuf.List...
constant ListValue_Values_field_name (line 108) | ListValue_Values_field_name protoreflect.Name = "values"
constant ListValue_Values_field_fullname (line 110) | ListValue_Values_field_fullname protoreflect.FullName = "google.protobuf...
constant ListValue_Values_field_number (line 115) | ListValue_Values_field_number protoreflect.FieldNumber = 1
FILE: _tools/src/google.golang.org/protobuf/internal/genid/timestamp_gen.go
constant File_google_protobuf_timestamp_proto (line 13) | File_google_protobuf_timestamp_proto = "google/protobuf/timestamp.proto"
constant Timestamp_message_name (line 17) | Timestamp_message_name protoreflect.Name = "Timestamp"
constant Timestamp_message_fullname (line 18) | Timestamp_message_fullname protoreflect.FullName = "google.protobuf.Time...
constant Timestamp_Seconds_field_name (line 23) | Timestamp_Seconds_field_name protoreflect.Name = "seconds"
constant Timestamp_Nanos_field_name (line 24) | Timestamp_Nanos_field_name protoreflect.Name = "nanos"
constant Timestamp_Seconds_field_fullname (line 26) | Timestamp_Seconds_field_fullname protoreflect.FullName = "google.protobu...
constant Timestamp_Nanos_field_fullname (line 27) | Timestamp_Nanos_field_fullname protoreflect.FullName = "google.protobu...
constant Timestamp_Seconds_field_number (line 32) | Timestamp_Seconds_field_number protoreflect.FieldNumber = 1
constant Timestamp_Nanos_field_number (line 33) | Timestamp_Nanos_field_number protoreflect.FieldNumber = 2
FILE: _tools/src/google.golang.org/protobuf/internal/genid/type_gen.go
constant File_google_protobuf_type_proto (line 13) | File_google_protobuf_type_proto = "google/protobuf/type.proto"
constant Syntax_enum_fullname (line 17) | Syntax_enum_fullname = "google.protobuf.Syntax"
constant Syntax_enum_name (line 18) | Syntax_enum_name = "Syntax"
constant Type_message_name (line 23) | Type_message_name protoreflect.Name = "Type"
constant Type_message_fullname (line 24) | Type_message_fullname protoreflect.FullName = "google.protobuf.Type"
constant Type_Name_field_name (line 29) | Type_Name_field_name protoreflect.Name = "name"
constant Type_Fields_field_name (line 30) | Type_Fields_field_name protoreflect.Name = "fields"
constant Type_Oneofs_field_name (line 31) | Type_Oneofs_field_name protoreflect.Name = "oneofs"
constant Type_Options_field_name (line 32) | Type_Options_field_name protoreflect.Name = "options"
constant Type_SourceContext_field_name (line 33) | Type_SourceContext_field_name protoreflect.Name = "source_context"
constant Type_Syntax_field_name (line 34) | Type_Syntax_field_name protoreflect.Name = "syntax"
constant Type_Name_field_fullname (line 36) | Type_Name_field_fullname protoreflect.FullName = "google.protob...
constant Type_Fields_field_fullname (line 37) | Type_Fields_field_fullname protoreflect.FullName = "google.protob...
constant Type_Oneofs_field_fullname (line 38) | Type_Oneofs_field_fullname protoreflect.FullName = "google.protob...
constant Type_Options_field_fullname (line 39) | Type_Options_field_fullname protoreflect.FullName = "google.protob...
constant Type_SourceContext_field_fullname (line 40) | Type_SourceContext_field_fullname protoreflect.FullName = "google.protob...
constant Type_Syntax_field_fullname (line 41) | Type_Syntax_field_fullname protoreflect.FullName = "google.protob...
constant Type_Name_field_number (line 46) | Type_Name_field_number protoreflect.FieldNumber = 1
constant Type_Fields_field_number (line 47) | Type_Fields_field_number protoreflect.FieldNumber = 2
constant Type_Oneofs_field_number (line 48) | Type_Oneofs_field_number protoreflect.FieldNumber = 3
constant Type_Options_field_number (line 49) | Type_Options_field_number protoreflect.FieldNumber = 4
constant Type_SourceContext_field_number (line 50) | Type_SourceContext_field_number protoreflect.FieldNumber = 5
constant Type_Syntax_field_number (line 51) | Type_Syntax_field_number protoreflect.FieldNumber = 6
constant Field_message_name (line 56) | Field_message_name protoreflect.Name = "Field"
constant Field_message_fullname (line 57) | Field_message_fullname protoreflect.FullName = "google.protobuf.Field"
constant Field_Kind_field_name (line 62) | Field_Kind_field_name protoreflect.Name = "kind"
constant Field_Cardinality_field_name (line 63) | Field_Cardinality_field_name protoreflect.Name = "cardinality"
constant Field_Number_field_name (line 64) | Field_Number_field_name protoreflect.Name = "number"
constant Field_Name_field_name (line 65) | Field_Name_field_name protoreflect.Name = "name"
constant Field_TypeUrl_field_name (line 66) | Field_TypeUrl_field_name protoreflect.Name = "type_url"
constant Field_OneofIndex_field_name (line 67) | Field_OneofIndex_field_name protoreflect.Name = "oneof_index"
constant Field_Packed_field_name (line 68) | Field_Packed_field_name protoreflect.Name = "packed"
constant Field_Options_field_name (line 69) | Field_Options_field_name protoreflect.Name = "options"
constant Field_JsonName_field_name (line 70) | Field_JsonName_field_name protoreflect.Name = "json_name"
constant Field_DefaultValue_field_name (line 71) | Field_DefaultValue_field_name protoreflect.Name = "default_value"
constant Field_Kind_field_fullname (line 73) | Field_Kind_field_fullname protoreflect.FullName = "google.protob...
constant Field_Cardinality_field_fullname (line 74) | Field_Cardinality_field_fullname protoreflect.FullName = "google.protob...
constant Field_Number_field_fullname (line 75) | Field_Number_field_fullname protoreflect.FullName = "google.protob...
constant Field_Name_field_fullname (line 76) | Field_Name_field_fullname protoreflect.FullName = "google.protob...
constant Field_TypeUrl_field_fullname (line 77) | Field_TypeUrl_field_fullname protoreflect.FullName = "google.protob...
constant Field_OneofIndex_field_fullname (line 78) | Field_OneofIndex_field_fullname protoreflect.FullName = "google.protob...
constant Field_Packed_field_fullname (line 79) | Field_Packed_field_fullname protoreflect.FullName = "google.protob...
constant Field_Options_field_fullname (line 80) | Field_Options_field_fullname protoreflect.FullName = "google.protob...
constant Field_JsonName_field_fullname (line 81) | Field_JsonName_field_fullname protoreflect.FullName = "google.protob...
constant Field_DefaultValue_field_fullname (line 82) | Field_DefaultValue_field_fullname protoreflect.FullName = "google.protob...
constant Field_Kind_field_number (line 87) | Field_Kind_field_number protoreflect.FieldNumber = 1
constant Field_Cardinality_field_number (line 88) | Field_Cardinality_field_number protoreflect.FieldNumber = 2
constant Field_Number_field_number (line 89) | Field_Number_field_number protoreflect.FieldNumber = 3
constant Field_Name_field_number (line 90) | Field_Name_field_number protoreflect.FieldNumber = 4
constant Field_TypeUrl_field_number (line 91) | Field_TypeUrl_field_number protoreflect.FieldNumber = 6
constant Field_OneofIndex_field_number (line 92) | Field_OneofIndex_field_number protoreflect.FieldNumber = 7
constant Field_Packed_field_number (line 93) | Field_Packed_field_number protoreflect.FieldNumber = 8
constant Field_Options_field_number (line 94) | Field_Options_field_number protoreflect.FieldNumber = 9
constant Field_JsonName_field_number (line 95) | Field_JsonName_field_number protoreflect.FieldNumber = 10
constant Field_DefaultValue_field_number (line 96) | Field_DefaultValue_field_number protoreflect.FieldNumber = 11
constant Field_Kind_enum_fullname (line 101) | Field_Kind_enum_fullname = "google.protobuf.Field.Kind"
constant Field_Kind_enum_name (line 102) | Field_Kind_enum_name = "Kind"
constant Field_Cardinality_enum_fullname (line 107) | Field_Cardinality_enum_fullname = "google.protobuf.Field.Cardinality"
constant Field_Cardinality_enum_name (line 108) | Field_Cardinality_enum_name = "Cardinality"
constant Enum_message_name (line 113) | Enum_message_name protoreflect.Name = "Enum"
constant Enum_message_fullname (line 114) | Enum_message_fullname protoreflect.FullName = "google.protobuf.Enum"
constant Enum_Name_field_name (line 119) | Enum_Name_field_name protoreflect.Name = "name"
constant Enum_Enumvalue_field_name (line 120) | Enum_Enumvalue_field_name protoreflect.Name = "enumvalue"
constant Enum_Options_field_name (line 121) | Enum_Options_field_name protoreflect.Name = "options"
constant Enum_SourceContext_field_name (line 122) | Enum_SourceContext_field_name protoreflect.Name = "source_context"
constant Enum_Syntax_field_name (line 123) | Enum_Syntax_field_name protoreflect.Name = "syntax"
constant Enum_Name_field_fullname (line 125) | Enum_Name_field_fullname protoreflect.FullName = "google.protob...
constant Enum_Enumvalue_field_fullname (line 126) | Enum_Enumvalue_field_fullname protoreflect.FullName = "google.protob...
constant Enum_Options_field_fullname (line 127) | Enum_Options_field_fullname protoreflect.FullName = "google.protob...
constant Enum_SourceContext_field_fullname (line 128) | Enum_SourceContext_field_fullname protoreflect.FullName = "google.protob...
constant Enum_Syntax_field_fullname (line 129) | Enum_Syntax_field_fullname protoreflect.FullName = "google.protob...
constant Enum_Name_field_number (line 134) | Enum_Name_field_number protoreflect.FieldNumber = 1
constant Enum_Enumvalue_field_number (line 135) | Enum_Enumvalue_field_number protoreflect.FieldNumber = 2
constant Enum_Options_field_number (line 136) | Enum_Options_field_number protoreflect.FieldNumber = 3
constant Enum_SourceContext_field_number (line 137) | Enum_SourceContext_field_number protoreflect.FieldNumber = 4
constant Enum_Syntax_field_number (line 138) | Enum_Syntax_field_number protoreflect.FieldNumber = 5
constant EnumValue_message_name (line 143) | EnumValue_message_name protoreflect.Name = "EnumValue"
constant EnumValue_message_fullname (line 144) | EnumValue_message_fullname protoreflect.FullName = "google.protobuf.Enum...
constant EnumValue_Name_field_name (line 149) | EnumValue_Name_field_name protoreflect.Name = "name"
constant EnumValue_Number_field_name (line 150) | EnumValue_Number_field_name protoreflect.Name = "number"
constant EnumValue_Options_field_name (line 151) | EnumValue_Options_field_name protoreflect.Name = "options"
constant EnumValue_Name_field_fullname (line 153) | EnumValue_Name_field_fullname protoreflect.FullName = "google.protobu...
constant EnumValue_Number_field_fullname (line 154) | EnumValue_Number_field_fullname protoreflect.FullName = "google.protobu...
constant EnumValue_Options_field_fullname (line 155) | EnumValue_Options_field_fullname protoreflect.FullName = "google.protobu...
constant EnumValue_Name_field_number (line 160) | EnumValue_Name_field_number protoreflect.FieldNumber = 1
constant EnumValue_Number_field_number (line 161) | EnumValue_Number_field_number protoreflect.FieldNumber = 2
constant EnumValue_Options_field_number (line 162) | EnumValue_Options_field_number protoreflect.FieldNumber = 3
constant Option_message_name (line 167) | Option_message_name protoreflect.Name = "Option"
constant Option_message_fullname (line 168) | Option_message_fullname protoreflect.FullName = "google.protobuf.Option"
constant Option_Name_field_name (line 173) | Option_Name_field_name protoreflect.Name = "name"
constant Option_Value_field_name (line 174) | Option_Value_field_name protoreflect.Name = "value"
constant Option_Name_field_fullname (line 176) | Option_Name_field_fullname protoreflect.FullName = "google.protobuf.Opt...
constant Option_Value_field_fullname (line 177) | Option_Value_field_fullname protoreflect.FullName = "google.protobuf.Opt...
constant Option_Name_field_number (line 182) | Option_Name_field_number protoreflect.FieldNumber = 1
constant Option_Value_field_number (line 183) | Option_Value_field_number protoreflect.FieldNumber = 2
FILE: _tools/src/google.golang.org/protobuf/internal/genid/wrappers.go
constant WrapperValue_Value_field_name (line 11) | WrapperValue_Value_field_name protoreflect.Name = "value"
constant WrapperValue_Value_field_number (line 12) | WrapperValue_Value_field_number protoreflect.FieldNumber = 1
FILE: _tools/src/google.golang.org/protobuf/internal/genid/wrappers_gen.go
constant File_google_protobuf_wrappers_proto (line 13) | File_google_protobuf_wrappers_proto = "google/protobuf/wrappers.proto"
constant DoubleValue_message_name (line 17) | DoubleValue_message_name protoreflect.Name = "DoubleValue"
constant DoubleValue_message_fullname (line 18) | DoubleValue_message_fullname protoreflect.FullName = "google.protobuf.Do...
constant DoubleValue_Value_field_name (line 23) | DoubleValue_Value_field_name protoreflect.Name = "value"
constant DoubleValue_Value_field_fullname (line 25) | DoubleValue_Value_field_fullname protoreflect.FullName = "google.protobu...
constant DoubleValue_Value_field_number (line 30) | DoubleValue_Value_field_number protoreflect.FieldNumber = 1
constant FloatValue_message_name (line 35) | FloatValue_message_name protoreflect.Name = "FloatValue"
constant FloatValue_message_fullname (line 36) | FloatValue_message_fullname protoreflect.FullName = "google.protobuf.Flo...
constant FloatValue_Value_field_name (line 41) | FloatValue_Value_field_name protoreflect.Name = "value"
constant FloatValue_Value_field_fullname (line 43) | FloatValue_Value_field_fullname protoreflect.FullName = "google.protobuf...
constant FloatValue_Value_field_number (line 48) | FloatValue_Value_field_number protoreflect.FieldNumber = 1
constant Int64Value_message_name (line 53) | Int64Value_message_name protoreflect.Name = "Int64Value"
constant Int64Value_message_fullname (line 54) | Int64Value_message_fullname protoreflect.FullName = "google.protobuf.Int...
constant Int64Value_Value_field_name (line 59) | Int64Value_Value_field_name protoreflect.Name = "value"
constant Int64Value_Value_field_fullname (line 61) | Int64Value_Value_field_fullname protoreflect.FullName = "google.protobuf...
constant Int64Value_Value_field_number (line 66) | Int64Value_Value_field_number protoreflect.FieldNumber = 1
constant UInt64Value_message_name (line 71) | UInt64Value_message_name protoreflect.Name = "UInt64Value"
constant UInt64Value_message_fullname (line 72) | UInt64Value_message_fullname protoreflect.FullName = "google.protobuf.UI...
constant UInt64Value_Value_field_name (line 77) | UInt64Value_Value_field_name protoreflect.Name = "value"
constant UInt64Value_Value_field_fullname (line 79) | UInt64Value_Value_field_fullname protoreflect.FullName = "google.protobu...
constant UInt64Value_Value_field_number (line 84) | UInt64Value_Value_field_number protoreflect.FieldNumber = 1
constant Int32Value_message_name (line 89) | Int32Value_message_name protoreflect.Name = "Int32Value"
constant Int32Value_message_fullname (line 90) | Int32Value_message_fullname protoreflect.FullName = "google.protobuf.Int...
constant Int32Value_Value_field_name (line 95) | Int32Value_Value_field_name protoreflect.Name = "value"
constant Int32Value_Value_field_fullname (line 97) | Int32Value_Value_field_fullname protoreflect.FullName = "google.protobuf...
constant Int32Value_Value_field_number (line 102) | Int32Value_Value_field_number protoreflect.FieldNumber = 1
constant UInt32Value_message_name (line 107) | UInt32Value_message_name protoreflect.Name = "UInt32Value"
constant UInt32Value_message_fullname (line 108) | UInt32Value_message_fullname protoreflect.FullName = "google.protobuf.UI...
constant UInt32Value_Value_field_name (line 113) | UInt32Value_Value_field_name protoreflect.Name = "value"
constant UInt32Value_Value_field_fullname (line 115) | UInt32Value_Value_field_fullname protoreflect.FullName = "google.protobu...
constant UInt32Value_Value_field_number (line 120) | UInt32Value_Value_field_number protoreflect.FieldNumber = 1
constant BoolValue_message_name (line 125) | BoolValue_message_name protoreflect.Name = "BoolValue"
constant BoolValue_message_fullname (line 126) | BoolValue_message_fullname protoreflect.FullName = "google.protobuf.Bool...
constant BoolValue_Value_field_name (line 131) | BoolValue_Value_field_name protoreflect.Name = "value"
constant BoolValue_Value_field_fullname (line 133) | BoolValue_Value_field_fullname protoreflect.FullName = "google.protobuf....
constant BoolValue_Value_field_number (line 138) | BoolValue_Value_field_number protoreflect.FieldNumber = 1
constant StringValue_message_name (line 143) | StringValue_message_name protoreflect.Name = "StringValue"
constant StringValue_message_fullname (line 144) | StringValue_message_fullname protoreflect.FullName = "google.protobuf.St...
constant StringValue_Value_field_name (line 149) | StringValue_Value_field_name protoreflect.Name = "value"
constant StringValue_Value_field_fullname (line 151) | StringValue_Value_field_fullname protoreflect.FullName = "google.protobu...
constant StringValue_Value_field_number (line 156) | StringValue_Value_field_number protoreflect.FieldNumber = 1
constant BytesValue_message_name (line 161) | BytesValue_message_name protoreflect.Name = "BytesValue"
constant BytesValue_message_fullname (line 162) | BytesValue_message_fullname protoreflect.FullName = "google.protobuf.Byt...
constant BytesValue_Value_field_name (line 167) | BytesValue_Value_field_name protoreflect.Name = "value"
constant BytesValue_Value_field_fullname (line 169) | BytesValue_Value_field_fullname protoreflect.FullName = "google.protobuf...
constant BytesValue_Value_field_number (line 174) | BytesValue_Value_field_number protoreflect.FieldNumber = 1
FILE: _tools/src/google.golang.org/protobuf/internal/impl/api_export.go
type Export (line 21) | type Export struct
method NewError (line 25) | func (Export) NewError(f string, x ...interface{}) error {
method EnumOf (line 35) | func (Export) EnumOf(e enum) pref.Enum {
method EnumDescriptorOf (line 48) | func (Export) EnumDescriptorOf(e enum) pref.EnumDescriptor {
method EnumTypeOf (line 61) | func (Export) EnumTypeOf(e enum) pref.EnumType {
method EnumStringOf (line 74) | func (Export) EnumStringOf(ed pref.EnumDescriptor, n pref.EnumNumber) ...
method ProtoMessageV1Of (line 95) | func (Export) ProtoMessageV1Of(m message) piface.MessageV1 {
method protoMessageV2Of (line 110) | func (Export) protoMessageV2Of(m message) pref.ProtoMessage {
method ProtoMessageV2Of (line 127) | func (Export) ProtoMessageV2Of(m message) pref.ProtoMessage {
method MessageOf (line 139) | func (Export) MessageOf(m message) pref.Message {
method MessageDescriptorOf (line 151) | func (Export) MessageDescriptorOf(m message) pref.MessageDescriptor {
method MessageTypeOf (line 163) | func (Export) MessageTypeOf(m message) pref.MessageType {
method MessageStringOf (line 175) | func (Export) MessageStringOf(m pref.ProtoMessage) string {
type legacyMessageWrapper (line 87) | type legacyMessageWrapper struct
method Reset (line 89) | func (m legacyMessageWrapper) Reset() { proto.Reset(m.m) }
method String (line 90) | func (m legacyMessageWrapper) String() string { return Export{}.Messag...
method ProtoMessage (line 91) | func (m legacyMessageWrapper) ProtoMessage() {}
FILE: _tools/src/google.golang.org/protobuf/internal/impl/checkinit.go
method checkInitialized (line 15) | func (mi *MessageInfo) checkInitialized(in piface.CheckInitializedInput)...
method checkInitializedPointer (line 25) | func (mi *MessageInfo) checkInitializedPointer(p pointer) error {
method isInitExtensions (line 65) | func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) e...
function needsInitCheck (line 93) | func needsInitCheck(md pref.MessageDescriptor) bool {
function needsInitCheckLocked (line 104) | func needsInitCheckLocked(md pref.Messa
Condensed preview — 528 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,577K chars).
[
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 169,
"preview": "*Issue #, if available:*\n\n*Description of changes:*\n\n\nBy submitting this pull request, I confirm that my contribution is"
},
{
"path": ".github/workflows/commit-checks.yml",
"chars": 973,
"preview": "name: commit checks\non:\n push:\njobs:\n run:\n name: tests\n runs-on: ubuntu-latest\n strategy:\n matrix:\n "
},
{
"path": ".github/workflows/stale.yaml",
"chars": 954,
"preview": "name: \"Stale issue handler\"\non:\n workflow_dispatch:\n schedule:\n - cron: \"0 0 * * *\" # This action would run every day"
},
{
"path": ".gitignore",
"chars": 43,
"preview": "*.test\nnpm-debug.log\n\n/bin\n/release\n/build\n"
},
{
"path": ".travis.yml",
"chars": 111,
"preview": "sudo: false\nlanguage: go\ngo:\n- 1.13.x\n- 1.14.x\n- 1.15.x\n- tip\nscript:\n- go install ./...\n- go test -race ./...\n"
},
{
"path": "CONTRIBUTING.md",
"chars": 5879,
"preview": "# Contributing\n\nThanks for helping make Twirp better! This is great!\n\n## Twirp Design Principles\n\nContributions to Twirp"
},
{
"path": "Gopkg.toml",
"chars": 750,
"preview": "# The importable parts of Twirp have no external dependencies. They just use the\n# standard library. But both protoc-gen"
},
{
"path": "LICENSE",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "Makefile",
"chars": 741,
"preview": "PATH := ${PWD}/_tools/bin:${PWD}/bin:${PATH}\nexport GO111MODULE=off\n\nall: setup test_all\n\n.PHONY: setup generate test_al"
},
{
"path": "NOTICE",
"chars": 69,
"preview": "Twirp\nCopyright 2018 Twitch Interactive, Inc. All Rights Reserved. \n"
},
{
"path": "PROTOCOL.md",
"chars": 8692,
"preview": "# Twirp Wire Protocol\n\nThis document defines the Twirp wire protocol over HTTP. The\ncurrent protocol version is v7.\n\n## "
},
{
"path": "README.md",
"chars": 4830,
"preview": " [](https://travis-ci.org/"
},
{
"path": "THIRD_PARTY",
"chars": 1542,
"preview": "** Protobuf -- https://github.com/protocolbuffers/protobuf-go\nCopyright 2010 The Go Authors. All rights reserved.\n\nRedi"
},
{
"path": "_tools/.gitignore",
"chars": 27,
"preview": "/bin/\n/pkg/\n/manifest.json\n"
},
{
"path": "_tools/src/github.com/kisielk/errcheck/LICENSE",
"chars": 1056,
"preview": "Copyright (c) 2013 Kamil Kisiel\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this so"
},
{
"path": "_tools/src/github.com/kisielk/errcheck/README.md",
"chars": 3957,
"preview": "# errcheck\n\nerrcheck is a program for checking for unchecked errors in go programs.\n\n[ except some files men"
},
{
"path": "_tools/src/github.com/kisielk/gotool/LICENSE",
"chars": 1080,
"preview": "Copyright (c) 2013 Kamil Kisiel <kamil@kamilkisiel.net>\n\nPermission is hereby granted, free of charge, to any person obt"
},
{
"path": "_tools/src/github.com/kisielk/gotool/README.md",
"chars": 415,
"preview": "gotool\n======\n[](https://godoc.org/github.com/kisielk/go"
},
{
"path": "_tools/src/github.com/kisielk/gotool/go13.go",
"chars": 213,
"preview": "// +build !go1.4\n\npackage gotool\n\nimport (\n\t\"go/build\"\n\t\"path/filepath\"\n\t\"runtime\"\n)\n\nvar gorootSrc = filepath.Join(runt"
},
{
"path": "_tools/src/github.com/kisielk/gotool/go14-15.go",
"chars": 212,
"preview": "// +build go1.4,!go1.6\n\npackage gotool\n\nimport (\n\t\"go/build\"\n\t\"path/filepath\"\n\t\"runtime\"\n)\n\nvar gorootSrc = filepath.Joi"
},
{
"path": "_tools/src/github.com/kisielk/gotool/go16-18.go",
"chars": 246,
"preview": "// +build go1.6,!go1.9\n\npackage gotool\n\nimport (\n\t\"go/build\"\n\t\"path/filepath\"\n\t\"runtime\"\n)\n\nvar gorootSrc = filepath.Joi"
},
{
"path": "_tools/src/github.com/kisielk/gotool/internal/load/path.go",
"chars": 614,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/github.com/kisielk/gotool/internal/load/pkg.go",
"chars": 713,
"preview": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/github.com/kisielk/gotool/internal/load/search.go",
"chars": 11182,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/github.com/kisielk/gotool/match.go",
"chars": 2243,
"preview": "// Copyright (c) 2009 The Go Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with"
},
{
"path": "_tools/src/github.com/kisielk/gotool/match18.go",
"chars": 10243,
"preview": "// Copyright (c) 2009 The Go Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with"
},
{
"path": "_tools/src/github.com/kisielk/gotool/tool.go",
"chars": 2065,
"preview": "// Package gotool contains utility functions used to implement the standard\n// \"cmd/go\" tool, provided as a convenience "
},
{
"path": "_tools/src/github.com/twitchtv/retool/LICENSE",
"chars": 11354,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "_tools/src/github.com/twitchtv/retool/README.md",
"chars": 5340,
"preview": "# Retool: Vendor thy tools! #\n\n[](https://travis"
},
{
"path": "_tools/src/github.com/twitchtv/retool/add.go",
"chars": 278,
"preview": "package main\n\nfunc (s spec) add(t *tool) {\n\tif s.find(t) != -1 {\n\t\tlog(t.Repository + \" already installed (did you mean "
},
{
"path": "_tools/src/github.com/twitchtv/retool/build.go",
"chars": 479,
"preview": "package main\n\n// builds all tools in the spec file using whatever is installed in the tool directory (_tools,\n// typical"
},
{
"path": "_tools/src/github.com/twitchtv/retool/clean.go",
"chars": 4852,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"go/build\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\ntype stringSet map[string]struct{}\n\nfunc "
},
{
"path": "_tools/src/github.com/twitchtv/retool/do.go",
"chars": 1589,
"preview": "package main\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\nfunc setPath() error {\n\tprevpath := os.Getenv(\"PA"
},
{
"path": "_tools/src/github.com/twitchtv/retool/input.go",
"chars": 5226,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar (\n\tverboseFlag = flag.Bool(\"verbose\", false, \"Enable more detailed ou"
},
{
"path": "_tools/src/github.com/twitchtv/retool/main.go",
"chars": 1030,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/Masterminds/semver\"\n)\n\nvar version = semver.MustParse(\"v1.3.5\""
},
{
"path": "_tools/src/github.com/twitchtv/retool/manifest.go",
"chars": 1156,
"preview": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\nconst manifestFile = \"manifest.json\"\n\ntype manifest ma"
},
{
"path": "_tools/src/github.com/twitchtv/retool/print.go",
"chars": 595,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\n\t\"github.com/pkg/errors\"\n)\n\nfunc log(msg string) {\n\tfmt.Fprintf(os.Stder"
},
{
"path": "_tools/src/github.com/twitchtv/retool/remove.go",
"chars": 285,
"preview": "package main\n\nfunc (s spec) remove(t *tool) {\n\tidx := s.find(t)\n\tif idx == -1 {\n\t\tfatal(t.Repository+\" is not in tools.j"
},
{
"path": "_tools/src/github.com/twitchtv/retool/spec.go",
"chars": 2616,
"preview": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/Masterminds/semver\"\n)\n\n// Filename t"
},
{
"path": "_tools/src/github.com/twitchtv/retool/sync.go",
"chars": 632,
"preview": "package main\n\nimport \"os\"\n\nfunc (s spec) sync() {\n\tm := getManifest()\n\tif m.outOfDate(s.Tools) {\n\t\t// Delete existing to"
},
{
"path": "_tools/src/github.com/twitchtv/retool/tool.go",
"chars": 3277,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/pkg/errors\"\n)\n\ntype tool struct"
},
{
"path": "_tools/src/github.com/twitchtv/retool/tooldir.go",
"chars": 2700,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"github.co"
},
{
"path": "_tools/src/github.com/twitchtv/retool/upgrade.go",
"chars": 284,
"preview": "package main\n\nfunc (s spec) upgrade(t *tool) {\n\tidx := s.find(t)\n\tif idx == -1 {\n\t\tlog(t.Repository + \" is not yet insta"
},
{
"path": "_tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/LICENSE.txt",
"chars": 1094,
"preview": "The Masterminds\nCopyright (C) 2014-2015, Matt Butcher and Matt Farina\n\nPermission is hereby granted, free of charge, to "
},
{
"path": "_tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/README.md",
"chars": 5805,
"preview": "# SemVer\n\nThe `semver` package provides the ability to work with [Semantic Versions](http://semver.org) in Go. Specifica"
},
{
"path": "_tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/collection.go",
"chars": 729,
"preview": "package semver\n\n// Collection is a collection of Version instances and implements the sort\n// interface. See the sort pa"
},
{
"path": "_tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/constraints.go",
"chars": 10165,
"preview": "package semver\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n)\n\n// Constraints is one or more constraint that a semant"
},
{
"path": "_tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/doc.go",
"chars": 3720,
"preview": "/*\nPackage semver provides the ability to work with Semantic Versions (http://semver.org) in Go.\n\nSpecifically it provid"
},
{
"path": "_tools/src/github.com/twitchtv/retool/vendor/github.com/Masterminds/semver/version.go",
"chars": 9287,
"preview": "package semver\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// The compiled version of the reg"
},
{
"path": "_tools/src/github.com/twitchtv/retool/vendor/github.com/pkg/errors/LICENSE",
"chars": 1312,
"preview": "Copyright (c) 2015, Dave Cheney <dave@cheney.net>\nAll rights reserved.\n\nRedistribution and use in source and binary form"
},
{
"path": "_tools/src/github.com/twitchtv/retool/vendor/github.com/pkg/errors/README.md",
"chars": 2242,
"preview": "# errors [](https://travis-ci.org/pkg/errors) [\n\n// Frame represents a program counter inside a st"
},
{
"path": "_tools/src/golang.org/x/sys/execabs/execabs.go",
"chars": 3622,
"preview": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/ast/astutil/enclosing.go",
"chars": 16022,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/ast/astutil/imports.go",
"chars": 13653,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/ast/astutil/rewrite.go",
"chars": 12272,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/ast/astutil/util.go",
"chars": 371,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/buildutil/allpackages.go",
"chars": 5090,
"preview": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/buildutil/fakecontext.go",
"chars": 3425,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/buildutil/overlay.go",
"chars": 2948,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/buildutil/tags.go",
"chars": 2010,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/buildutil/util.go",
"chars": 5880,
"preview": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/internal/cgo/cgo.go",
"chars": 7373,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go",
"chars": 1046,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/loader/doc.go",
"chars": 9662,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/loader/loader.go",
"chars": 33763,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/golang.org/x/tools/go/loader/util.go",
"chars": 3001,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/init.go",
"chars": 4490,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/main.go",
"chars": 28045,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/reflect.go",
"chars": 10612,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/well_known_types.go",
"chars": 39011,
"preview": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/cmd/protoc-gen-go/main.go",
"chars": 1706,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/compiler/protogen/protogen.go",
"chars": 40604,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/encoding/prototext/decode.go",
"chars": 20671,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/encoding/prototext/doc.go",
"chars": 276,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/encoding/prototext/encode.go",
"chars": 11043,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/encoding/protowire/wire.go",
"chars": 13334,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/descfmt/stringer.go",
"chars": 9640,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/descopts/options.go",
"chars": 1129,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/detrand/rand.go",
"chars": 1683,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/defval/default.go",
"chars": 6059,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/messageset/messageset.go",
"chars": 7581,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/tag/tag.go",
"chars": 6946,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/text/decode.go",
"chars": 16590,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/text/decode_number.go",
"chars": 3974,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/text/decode_string.go",
"chars": 4915,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/text/decode_token.go",
"chars": 9456,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/text/doc.go",
"chars": 1460,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/encoding/text/encode.go",
"chars": 7190,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/errors/errors.go",
"chars": 2114,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/errors/is_go112.go",
"chars": 759,
"preview": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/errors/is_go113.go",
"chars": 297,
"preview": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/filedesc/build.go",
"chars": 5155,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/filedesc/desc.go",
"chars": 22655,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/filedesc/desc_init.go",
"chars": 13369,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/filedesc/desc_lazy.go",
"chars": 21331,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/filedesc/desc_list.go",
"chars": 14614,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go",
"chars": 8574,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/filedesc/placeholder.go",
"chars": 6733,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/filetype/build.go",
"chars": 10386,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/flags/flags.go",
"chars": 1100,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go",
"chars": 225,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go",
"chars": 223,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/any_gen.go",
"chars": 1020,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/api_gen.go",
"chars": 4753,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/descriptor_gen.go",
"chars": 48012,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/doc.go",
"chars": 419,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/duration_gen.go",
"chars": 1103,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/empty_gen.go",
"chars": 549,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/field_mask_gen.go",
"chars": 901,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/goname.go",
"chars": 692,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/map_entry.go",
"chars": 550,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/source_context_gen.go",
"chars": 970,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/struct_gen.go",
"chars": 4175,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/timestamp_gen.go",
"chars": 1120,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/type_gen.go",
"chars": 7847,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/wrappers.go",
"chars": 451,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/genid/wrappers_gen.go",
"chars": 5165,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/api_export.go",
"chars": 4915,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/checkinit.go",
"chars": 3557,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_extension.go",
"chars": 5810,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_field.go",
"chars": 24890,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_gen.go",
"chars": 165316,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_map.go",
"chars": 10356,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_map_go111.go",
"chars": 720,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_map_go112.go",
"chars": 282,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_message.go",
"chars": 7215,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_messageset.go",
"chars": 3228,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_reflect.go",
"chars": 5381,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_tables.go",
"chars": 15583,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/codec_unsafe.go",
"chars": 485,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/convert.go",
"chars": 14977,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/convert_list.go",
"chars": 3559,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/convert_map.go",
"chars": 2955,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/decode.go",
"chars": 7406,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/encode.go",
"chars": 5201,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/enum.go",
"chars": 559,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/extension.go",
"chars": 4649,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/legacy_enum.go",
"chars": 6715,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/legacy_export.go",
"chars": 3170,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/legacy_extension.go",
"chars": 7331,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/legacy_file.go",
"chars": 2570,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/legacy_message.go",
"chars": 18229,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/merge.go",
"chars": 4519,
"preview": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/merge_gen.go",
"chars": 4640,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/message.go",
"chars": 8417,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/message_reflect.go",
"chars": 13628,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/message_reflect_field.go",
"chars": 14997,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/message_reflect_gen.go",
"chars": 8001,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/pointer_reflect.go",
"chars": 6457,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/pointer_unsafe.go",
"chars": 6995,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/validate.go",
"chars": 15320,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/impl/weak.go",
"chars": 1935,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/order/order.go",
"chars": 2923,
"preview": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/order/range.go",
"chars": 2765,
"preview": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/pragma/pragma.go",
"chars": 1105,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/set/ints.go",
"chars": 1191,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/strs/strings.go",
"chars": 5362,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/strs/strings_pure.go",
"chars": 585,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/strs/strings_unsafe.go",
"chars": 2478,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/internal/version/version.go",
"chars": 2311,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/checkinit.go",
"chars": 1935,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/decode.go",
"chars": 8251,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/decode_gen.go",
"chars": 14995,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/doc.go",
"chars": 3216,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/encode.go",
"chars": 10161,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/encode_gen.go",
"chars": 3573,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/equal.go",
"chars": 4378,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/extension.go",
"chars": 2973,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/merge.go",
"chars": 4485,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/messageset.go",
"chars": 3045,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/proto.go",
"chars": 1391,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/proto_methods.go",
"chars": 498,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/proto_reflect.go",
"chars": 485,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/reset.go",
"chars": 1018,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/size.go",
"chars": 3057,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/size_gen.go",
"chars": 1887,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/proto/wrappers.go",
"chars": 1084,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protodesc/desc.go",
"chars": 10564,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protodesc/desc_init.go",
"chars": 9727,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go",
"chars": 10125,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protodesc/desc_validate.go",
"chars": 16546,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protodesc/proto.go",
"chars": 9712,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/methods.go",
"chars": 1982,
"preview": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/proto.go",
"chars": 14780,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/source.go",
"chars": 3979,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/source_gen.go",
"chars": 11948,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/type.go",
"chars": 25186,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/value.go",
"chars": 11219,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/value_pure.go",
"chars": 1214,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/value_union.go",
"chars": 11283,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go",
"chars": 2742,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/reflect/protoregistry/registry.go",
"chars": 24920,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/runtime/protoiface/legacy.go",
"chars": 321,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/runtime/protoiface/methods.go",
"chars": 5001,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "_tools/src/google.golang.org/protobuf/runtime/protoimpl/impl.go",
"chars": 1482,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
}
]
// ... and 328 more files (download for full content)
About this extraction
This page contains the full source code of the twitchtv/twirp GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 528 files (4.0 MB), approximately 1.1M tokens, and a symbol index with 9500 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.