Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加clean子命令 #26

Closed
voidint opened this issue Sep 1, 2017 · 0 comments
Closed

添加clean子命令 #26

voidint opened this issue Sep 1, 2017 · 0 comments

Comments

@voidint
Copy link
Owner

voidint commented Sep 1, 2017

假设待编译的项目结构类似这样

./go
└── cmd
    ├── cmd1
    │   └── main.go
    ├── cmd2
    │   └── main.go
    └── cmd3
        └── main.go

并且在gbb.json中指定的toolgo build,那么编译后必然在每个cmd子目录下留下一个可执行文件。原生的go clean命令仅支持清除当前目录下的编译产物,gbb clean将遍历所有的子命令目录并清除编译产物。

gbb clean命令将支持go clean命令的所有命令行选项:

The -i flag causes clean to remove the corresponding installed
archive or binary (what 'go install' would create).

The -n flag causes clean to print the remove commands it would execute,
but not run them.

The -r flag causes clean to be applied recursively to all the
dependencies of the packages named by the import paths.

The -x flag causes clean to print remove commands as it executes them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant