 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type ExitError
- type Runner
- type RunnerOption
- func RunnerWithCachePath(cachePath string) RunnerOption
- func RunnerWithDirMode() RunnerOption
- func RunnerWithHarbormaster() RunnerOption
- func RunnerWithLogger(logger *zap.Logger) RunnerOption
- func RunnerWithPrintFields(printFields string) RunnerOption
- func RunnerWithProtocURL(protocURL string) RunnerOption
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner interface {
	Init(args []string, uncomment bool) error
	Version() error
	Download() error
	Clean() error
	Files(args []string) error
	Compile(args []string) error
	Gen(args []string) error
	DescriptorProto(args []string) error
	FieldDescriptorProto(args []string) error
	ServiceDescriptorProto(args []string) error
	ProtocCommands(args []string, genCommands bool) error
	Lint(args []string) error
	ListLinters() error
	ListAllLinters() error
	ListLintGroup(group string) error
	ListAllLintGroups() error
	Format(args []string, overwrite bool, diffMode bool, lintMode bool) error
	BinaryToJSON(args []string) error
	JSONToBinary(args []string) error
	All(args []string, disableFormat bool, disableLint bool) error
	GRPC(args []string, headers []string, callTimeout string, connectTimeout string, keepaliveTime string) error
}
    Runner runs commands.
type RunnerOption ¶
type RunnerOption func(*runner)
RunnerOption is an option for a new Runner.
func RunnerWithCachePath ¶
func RunnerWithCachePath(cachePath string) RunnerOption
RunnerWithCachePath returns a RunnerOption that uses the given cache path.
func RunnerWithDirMode ¶
func RunnerWithDirMode() RunnerOption
RunnerWithDirMode returns a RunnerOption that will act as if the file given is the directory of the file, but only print the failures from that file.
func RunnerWithHarbormaster ¶ added in v0.2.0
func RunnerWithHarbormaster() RunnerOption
RunnerWithHarbormaster returns a RunnerOption that will print failures as Harbormaster compatible JSON.
https://secure.phabricator.com/conduit/method/harbormaster.sendmessage
func RunnerWithLogger ¶
func RunnerWithLogger(logger *zap.Logger) RunnerOption
RunnerWithLogger returns a RunnerOption that uses the given logger.
The default is to use zap.NewNop().
func RunnerWithPrintFields ¶
func RunnerWithPrintFields(printFields string) RunnerOption
RunnerWithPrintFields returns a RunnerOption that uses the given colon-separated print fields. The default is filename:line:column:message.
func RunnerWithProtocURL ¶
func RunnerWithProtocURL(protocURL string) RunnerOption
RunnerWithProtocURL returns a RunnerOption that uses the given protoc zip file URL.