Documentation
¶
Index ¶
- Variables
- func RunClient(ctx context.Context, name string, opts ...fx.Option) error
- func RunServer(ctx context.Context, name string, opts ...fx.Option) error
- func SanitizeArgs(args []string) []string
- func SplitFlag(flag string) (string, string)
- func Start(lc fx.Lifecycle, fn StartFn)
- type Command
- type Config
- type ENV
- type File
- type FlagSet
- type InputConfig
- type None
- type OutputConfig
- type ReaderWriter
- type StartFn
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLocation = errors.New("invalid location (format kind:location)")
ErrInvalidLocation for cmd.
View Source
var ErrLocationMissing = errors.New("location is missing")
ErrLocationMissing for cmd.
View Source
var ErrNoEncoder = errors.New("config: no encoder")
ErrNoEncoder for cmd.
View Source
var Module = fx.Options( fx.Provide(NewInputConfig), fx.Provide(NewOutputConfig), )
Module for fx.
Functions ¶
func SanitizeArgs ¶ added in v1.441.0
SanitizeArgs removes all flags that start with -test.
Types ¶
type Command ¶ added in v1.39.0
type Command struct {
// contains filtered or unexported fields
}
Command for application.
func (*Command) ExitOnError ¶ added in v1.424.0
ExitOnError will run the command and exit on error.
type Config ¶ added in v1.78.0
type Config struct {
// contains filtered or unexported fields
}
Config for cmd.
type ENV ¶ added in v1.81.0
type ENV struct {
// contains filtered or unexported fields
}
ENV for cmd.
type File ¶ added in v1.81.0
type File struct {
// contains filtered or unexported fields
}
File for cmd.
type FlagSet ¶ added in v1.441.0
FlagSet represents a set of defined flags.
func NewFlagSet ¶ added in v1.441.0
NewFlagSet creates a new flag set with the given name.
type InputConfig ¶ added in v1.81.0
type InputConfig struct {
*Config
}
InputConfig for cmd.
func NewInputConfig ¶ added in v1.81.0
func NewInputConfig(set *FlagSet, enc *encoding.Map, fs os.FileSystem) *InputConfig
NewInputConfig for cmd.
type OutputConfig ¶ added in v1.181.0
type OutputConfig struct {
*Config
}
OutputConfig for cmd.
func NewOutputConfig ¶ added in v1.181.0
func NewOutputConfig(set *FlagSet, enc *encoding.Map, fs os.FileSystem) *OutputConfig
NewOutputConfig for cmd.
type ReaderWriter ¶ added in v1.81.0
type ReaderWriter interface { // Read bytes. Read() (string, error) // Write bytes with file's mode. Write(data string, mode os.FileMode) error // Kind of read writer. Kind() string }
ReaderWriter for cmd.
func NewReadWriter ¶ added in v1.172.5
func NewReadWriter(kind, location string, fs os.FileSystem) ReaderWriter
NewReadWriter for cmd.
Click to show internal directories.
Click to hide internal directories.