Documentation
¶
Overview ¶
Package cliplugin contains helper functionality for protoc plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler interface {
// If Handle returns a user error and no system errors, this will be added to the error field.
// If Handle returns any system error, the whole error will be printed as an error to stderr
// and the plugin will exit with code 1.
// Only one of files and error can be returned.
Handle(
stderr io.Writer,
request *plugin_go.CodeGeneratorRequest,
) ([]*plugin_go.CodeGeneratorResponse_File, error)
}
Handler handles protoc plugun functionality.
type HandlerFunc ¶
type HandlerFunc func(io.Writer, *plugin_go.CodeGeneratorRequest) ([]*plugin_go.CodeGeneratorResponse_File, error)
HandlerFunc is a function that implements Handler.
func (HandlerFunc) Handle ¶
func (h HandlerFunc) Handle( stderr io.Writer, request *plugin_go.CodeGeneratorRequest, ) ([]*plugin_go.CodeGeneratorResponse_File, error)
Handle implements Handler.
Click to show internal directories.
Click to hide internal directories.