Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transformer ¶
type Transformer interface { // Failures should never happen in the CLI tool as we run the files // through protoc first, but this is done because we want to verify // code correctness here and protect against the bad case. Transform(config settings.Config, data []byte) ([]byte, []*text.Failure, error) }
Transformer transforms an input file into an output file.
func NewTransformer ¶
func NewTransformer(options ...TransformerOption) Transformer
NewTransformer returns a new Transformer.
type TransformerOption ¶
type TransformerOption func(*transformer)
TransformerOption is an option for a new Transformer.
func TransformerWithLogger ¶
func TransformerWithLogger(logger *zap.Logger) TransformerOption
TransformerWithLogger returns a TransformerOption that uses the given logger.
The default is to use zap.NewNop().
Click to show internal directories.
Click to hide internal directories.