假设待编译的项目结构类似这样
./go
└── cmd
├── cmd1
│ └── main.go
├── cmd2
│ └── main.go
└── cmd3
└── main.go
并且在gbb.json中指定的tool是go 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.
假设待编译的项目结构类似这样
./go └── cmd ├── cmd1 │ └── main.go ├── cmd2 │ └── main.go └── cmd3 └── main.go并且在
gbb.json中指定的tool是go build,那么编译后必然在每个cmd子目录下留下一个可执行文件。原生的go clean命令仅支持清除当前目录下的编译产物,gbb clean将遍历所有的子命令目录并清除编译产物。gbb clean命令将支持go clean命令的所有命令行选项: