goprotoc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package goprotoc implements the goprotoc command logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

Main is the entrypoint for the program.

func RegisterPlugin added in v0.3.0

func RegisterPlugin(lang string, plugin plugins.Plugin)

RegisterPlugin registers the name of an in-process goprotoc plugin. The given name should not include the "protoc-gen-" prefix that a plugin binary name would have. If the command-line contains a "-plugin" argument to configure the named output type, that will be respected and the in-process plugin will not be used. This can be used to override the use of "protoc" as the source of code gen for Java, C++, Python, etc.

If function will panic if the given name already has an in-process plugin registered.

This function is not thread-safe. It should be invoked during program initialization, before other functions in this package are invoked to run the goprotoc tool.

func Run

func Run(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int

Run runs the program and returns the exit code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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