command

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package command 子命令管理

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("找不到该子命令")

ErrNotFound 子命令未注册,通过 web hep [subcommnad] 时,返回此错误信息。

Functions

func Exec

func Exec(output io.Writer) error

Exec 执行子命令

func Register

func Register(name string, do func(io.Writer) error, usage func(io.Writer))

Register 注册 usage 函数,注册的功能会在调用 web help xx 时调用。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳