options

package
v0.0.0-...-e87e0c3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CliOptions

type CliOptions interface {
	AddFlags(fs *pflag.FlagSet) // 生成一个被 pflag 封装后的日志对象
	Validate() error            // 添加你想要的验证函数
}

CliOptions 具体的配置项实现的接口,CliConfigOptions会调用CliOptions来进行命令的分组

type CompletableOptions

type CompletableOptions interface {
	Complete() error
}

CompletableOptions abstracts options which can be completed.

type ConfigurableOptions

type ConfigurableOptions interface {
	// ApplyFlags parsing parameters from the command line or configuration file
	// to the options instance.
	ApplyFlags() []error
}

ConfigurableOptions abstracts configuration options for reading parameters from a configuration file.

type PrintableOptions

type PrintableOptions interface {
	String() string
}

PrintableOptions abstracts options which can be printed.

Jump to

Keyboard shortcuts

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