wellknownimports

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package wellknownimports provides source code for the well-known import files for use with a protocompile.Compiler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithStandardImports

func WithStandardImports(resolver protocompile.Resolver) protocompile.Resolver

WithStandardImports returns a new resolver that can provide the source code for the standard imports that are included with protoc. This differs from protocompile.WithStandardImports, which uses descriptors embedded in generated code in the Protobuf Go module. That function is lighter weight, and does not need to bring in additional embedded data outside the Protobuf Go runtime. This version includes its own embedded versions of the source files.

Unlike protocompile.WithStandardImports, this resolver does not provide results for "google/protobuf/go_features.proto" file. This resolver is backed by source files that are shipped with the Protobuf installation, which does not include that file.

It is possible that the source code provided by this resolver differs from the source code used to create the descriptors provided by protocompile.WithStandardImports. That is because that other function depends on the Protobuf Go module, which could resolve in user programs to a different version than was used to build this package.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL