通过命令行(MacOS)_test.go使用时,可以排除文件go run。
go run $(ls -1 dir/*.go | grep -v _test.go)
但是,似乎通过Go makefile并没有以类似的方式使用该命令。例如,
start: go run $(ls -1 dir/*.go | grep -v _test.go)
和
start: go run `$(ls -1 dir/\*.go | grep -v _test.go)`
两者都会导致
go run: no go files listed
grep在Go Makefile中使用和类似命令的正确方法是什么?
胡子哥哥
手掌心
慕雪6442864
随时随地看视频慕课网APP
相关分类