args

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

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

This section is empty.

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