prefer-make
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBuild with Make
使用Make构建
This project uses a Makefile. Always prefer targets over running commands directly.
makego本项目使用Makefile。请始终优先使用目标,而非直接运行命令。
makegoRules
规则
- Before running any ,
go build,go test,go run,go vet, orgo fmtcommand, check the Makefile for a corresponding target.golangci-lint - Use the Makefile target instead of the raw command. For example:
go- instead of
make buildgo build ./... - instead of
make testgo test ./... - instead of
make lintgolangci-lint run - instead of
make rungo run main.go - instead of
make fmtgo fmt ./...
- If you need to discover available targets, run first. If that fails, read the Makefile directly.
make help - Only fall back to raw commands if no relevant Makefile target exists for the task.
go
- 在运行任何、
go build、go test、go run、go vet或go fmt命令之前,请先检查Makefile中是否有对应的目标。golangci-lint - 使用Makefile目标替代原生命令。例如:
go- 替代
make buildgo build ./... - 替代
make testgo test ./... - 替代
make lintgolangci-lint run - 替代
make rungo run main.go - 替代
make fmtgo fmt ./...
- 若需要查看可用目标,请先运行。如果该命令无效,请直接阅读Makefile。
make help - 仅当Makefile中没有对应任务的相关目标时,才退而使用原生命令。
go