Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/polaris1119/command
实现类型go命令管理功能,方便管理子命令以及输出帮助信息等
https://github.com/polaris1119/command
Last synced: about 1 month ago
JSON representation
实现类型go命令管理功能,方便管理子命令以及输出帮助信息等
- Host: GitHub
- URL: https://github.com/polaris1119/command
- Owner: polaris1119
- Created: 2013-02-22T06:39:59.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-22T06:48:06.000Z (almost 12 years ago)
- Last Synced: 2023-04-01T05:11:40.686Z (almost 2 years ago)
- Size: 109 KB
- Stars: 17
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
command
=======实现类型go命令管理功能,方便管理子命令以及输出帮助信息等
使用方法
====
package mainimport (
"command"
)var cmdInstall = &command.Command{
UsageLine: "install [flags] [packages]",
Short: "compile and install packages and dependencies",
Long: `
Install compiles and installs the packages named by the import paths,
along with their dependencies.
`,
}func init() {
cmdInstall.Run = runInstall
}func main() {
usageLine := "autogo is a useful tool that helps building go projects automatically"
commands := []*command.Command{
cmdInstall,
}
command.InitProgram(usageLine, commands)
}func runInstall(cmd *command.Command, args []string) {
}