args

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 17 Imported by: 13

Documentation

Index

Constants

View Source
const EnvPluginMode = "KITEX_PLUGIN_MODE"

EnvPluginMode is an environment that kitex uses to distinguish run modes.

Variables

This section is empty.

Functions

func LookupTool added in v0.9.0

func LookupTool(idlType, compilerPath string) string

LookupTool returns the compiler path found in $PATH; if not found, returns $GOPATH/bin/$tool

func ValidateCMD added in v0.9.0

func ValidateCMD(path, idlType string)

ValidateCMD check if the path exists and if the version is satisfied

Types

type Arguments

type Arguments struct {
	generator.Config
	// contains filtered or unexported fields
}

Arguments .

func (*Arguments) AddExtraFlag

func (a *Arguments) AddExtraFlag(e *ExtraFlag)

AddExtraFlag .

func (*Arguments) BuildCmd

func (a *Arguments) BuildCmd(out io.Writer) *exec.Cmd

BuildCmd builds an exec.Cmd.

func (*Arguments) ParseArgs

func (a *Arguments) ParseArgs(version string)

ParseArgs parses command line arguments.

type ExtraFlag

type ExtraFlag struct {
	// apply may add flags to the FlagSet.
	Apply func(*flag.FlagSet)

	// check may perform any value checking for flags added by apply above.
	// When an error occur, check should directly terminate the program by
	// os.Exit with exit code 1 for internal error and 2 for invalid arguments.
	Check func(*Arguments)
}

ExtraFlag is designed for adding flags that is irrelevant to code generation.

Jump to

Keyboard shortcuts

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