Documentation
¶
Index ¶
- Constants
- func Args(args ...interface{}) *optionArgs
- func Async() *optionAsync
- func Cache() *optionCache
- func Charset(charset string) *optionCharset
- func Checker(checker checker) *optionChecker
- func Cli(cli string) *optionArgs
- func Code(ok int) *optionCode
- func CollectAny() *optionOutputType
- func CollectCache() *optionCollectorMode
- func CollectDirect() *optionCollectorMode
- func CollectStderr() *optionOutputType
- func CollectStdout() *optionOutputType
- func Collector(collector collector) *optionCollector
- func ContainsAllChecker(items []string, opts ...checkerOption) *optionChecker
- func ContainsAnyChecker(items []string, opts ...checkerOption) *optionChecker
- func ContainsChecker(contains string, opts ...checkerOption) *optionChecker
- func Context(context context.Context) *optionContext
- func Counter(counter counter) *optionCounter
- func Dir(dir string) *optionDir
- func DisablePwe() *optionPwe
- func DisableSystemEnv() *optionSystemEnv
- func Env(key string, value string) *optionEnv
- func EqualChecker(equal string, opts ...checkerOption) *optionChecker
- func Exec(command string, opts ...option) (code int, err error)
- func FileCollector(file *os.File, opts ...collectorOption) *optionCollector
- func FileStderr(file *os.File) *optionStderr
- func FileStdin(file *os.File) *optionStdin
- func FileStdout(file *os.File) *optionStdout
- func FilenameCollector(filename string, opts ...fileOption) (collector *optionCollector)
- func FilenameStderr(filename string, opts ...fileOption) (stderr *optionStderr)
- func FilenameStdout(filename string, opts ...fileOption) (stdout *optionStdout)
- func FuncNotifier(fun notifyFunc) *optionNotifier
- func LineCounter(total *int64, opts ...counterOption) *optionCounter
- func Max(max int) *optionMax
- func NewOptions(opts ...option) []option
- func Notifier(notifier notifier) *optionNotifier
- func OkCode(ok int) *optionCode
- func PathMatchChecker(pattern string, opts ...checkerOption) *optionChecker
- func Pipe(name string, opts ...pipeOption) *optionPipe
- func Pwe() *optionPwe
- func Quiet() *optionQuiet
- func ReaderStdin(reader io.Reader) *optionStdin
- func RegexpChecker(regexp string, opts ...checkerOption) *optionChecker
- func Stderr(stderr io.Writer) *optionStderr
- func Stdout(stdout io.Writer) *optionStdout
- func StringCollector(string *string, opts ...collectorOption) *optionCollector
- func StringEnv(env string) *optionStringEnvs
- func StringEnvs(envs ...string) *optionStringEnvs
- func Sync() *optionAsync
- func Terminal() *optionTerminal
- func WriteMode(mode writeMode) *optionWriteMode
- func WriterCollector(writer io.Writer, opts ...collectorOption) *optionCollector
- type CollectorMode
- type OutputType
Constants ¶
View Source
const ( // WriteModeSkip 跳过 WriteModeSkip writeMode = 1 // WriteModeOverride 覆盖 WriteModeOverride writeMode = 2 // WriteModeError 返回错误 WriteModeError writeMode = 3 // WriteModeRename 重命名 WriteModeRename writeMode = 4 // WriteModeAppend 追加 WriteModeAppend writeMode = 5 )
Variables ¶
This section is empty.
Functions ¶
func ContainsAllChecker ¶
func ContainsAllChecker(items []string, opts ...checkerOption) *optionChecker
ContainsAllChecker 字符串包含检查器
func ContainsAnyChecker ¶
func ContainsAnyChecker(items []string, opts ...checkerOption) *optionChecker
ContainsAnyChecker 字符串包含检查器
func ContainsChecker ¶
func ContainsChecker(contains string, opts ...checkerOption) *optionChecker
ContainsChecker 字符串包含检查器
func DisableSystemEnv ¶ added in v0.2.3
func DisableSystemEnv() *optionSystemEnv
DisableSystemEnv 关闭系统环境变量
func EqualChecker ¶
func EqualChecker(equal string, opts ...checkerOption) *optionChecker
EqualChecker 字符串全等检查器
func FileCollector ¶
FileCollector 配置输出到文件
func FilenameCollector ¶
func FilenameCollector(filename string, opts ...fileOption) (collector *optionCollector)
FilenameCollector 配置输出到文件
func FilenameStderr ¶
func FilenameStderr(filename string, opts ...fileOption) (stderr *optionStderr)
FilenameStderr 文件名输出
func FilenameStdout ¶
func FilenameStdout(filename string, opts ...fileOption) (stdout *optionStdout)
FilenameStdout 文件名输出
func LineCounter ¶ added in v0.2.6
func LineCounter(total *int64, opts ...counterOption) *optionCounter
LineCounter 行计数器
func PathMatchChecker ¶
func PathMatchChecker(pattern string, opts ...checkerOption) *optionChecker
PathMatchChecker 路径匹配检查器
func RegexpChecker ¶
func RegexpChecker(regexp string, opts ...checkerOption) *optionChecker
RegexpChecker 正则表达式检查器
func StringCollector ¶
func StringCollector(string *string, opts ...collectorOption) *optionCollector
StringCollector 配置输出到字符串
func StringEnvs ¶ added in v0.2.3
func StringEnvs(envs ...string) *optionStringEnvs
StringEnvs 环境变量列表
func WriterCollector ¶
WriterCollector 配置输出到文件
Types ¶
type CollectorMode ¶
type CollectorMode uint8
CollectorMode 收集模式
const ( // CollectorModeCache 缓存 CollectorModeCache CollectorMode = 1 // CollectorModeDirect 直接输出 CollectorModeDirect CollectorMode = 2 )
type OutputType ¶
type OutputType uint8
OutputType 输出类型
const ( // OutputTypeStdout 输出流 OutputTypeStdout OutputType = 1 // OutputTypeStderr 错误流 OutputTypeStderr OutputType = 2 // OutputTypeAny 所有输出 OutputTypeAny OutputType = 3 )
Source Files
¶
- checker.go
- checker_contains.go
- checker_contains_all.go
- checker_contains_any.go
- checker_equal.go
- checker_option.go
- checker_path_match.go
- checker_regexp.go
- code.go
- collector.go
- collector_mode.go
- collector_option.go
- collector_string.go
- collector_type.go
- collector_writer.go
- command.go
- const.go
- counter.go
- counter_line.go
- counter_option.go
- env.go
- exception.go
- file.go
- file_option.go
- gex.go
- notifier.go
- notifier_func.go
- notify_func.go
- option.go
- option_args.go
- option_async.go
- option_cache.go
- option_charset.go
- option_checker.go
- option_code.go
- option_collector.go
- option_collector_mode.go
- option_context.go
- option_counter.go
- option_dir.go
- option_env.go
- option_envs_string.go
- option_max.go
- option_notifier.go
- option_output_type.go
- option_pipe.go
- option_pwe.go
- option_quiet.go
- option_stderr.go
- option_stdin.go
- option_stdout.go
- option_system_env.go
- option_terminal.go
- option_write_mode.go
- pipe.go
- pipe_option.go
- str.go
- system.go
- wait_group.go
- write_mode.go
Click to show internal directories.
Click to hide internal directories.
