package
0.0.0-20240210095454-5fef39cd83c3
Repository: https://github.com/myitcv/x.git
Documentation: pkg.go.dev
# README
myitcv.io/cmd/protoc
The protoc command is a Go modules-based wrapper around the C++ protoc command.
Usage:
protoc [-Ipkg pkg]... [-go-out options] protofile...
protoc also ensures, using gobin -m, that protoc-gen-go is available to the
underlying C++ protoc command. gobin is therefore assumed to be on PATH.
The -Ipkg flag takes a package path. The directory corresponding to the package
is passed to the underlying protoc as a -I value. The -Ipkg flag may be
repeated.
The -go-out flag is passed verbatim to the underlying protoc command. As
documented at
https://github.com/golang/protobuf#using-protocol-buffers-with-go, the -go-out
flag can be used to control the output directory for generated Go code.
protoc maintains a cache of C++ protoc installations and protoc-gen-go
binaries. By default, protoc uses the directories
protoc-cache/$goos/$goarch/$version under your user cache directory. See the
documentation for os.UserCacheDir for OS-specific details on how to configure
its location. Setting PROTOCCACHE overrides the default.
The -silent flag does not exist in the underlying C++ protoc command. It allows
protoc to exit without error and without calling the underlying C++ protoc
command if any of the input files do not exist. This is particularly useful
when protoc is being used as a go:generate directive and the input file(s)
are the result of a generation step in another package.
# Functions
Asset loads and returns the asset for the given name.
AssetDir returns the file names below a certain directory embedded in the file by go-bindata.
AssetNames returns the names of the assets.
ExitCode returns the exit code of the exited process, or -1 if the process hasn't exited or was terminated by a signal.