如何在多个go模块的父目录中运行“go test”并在出现错误时返回非零

如何在多个go模块的父目录中运行“go test”并在出现错误时返回非零

问题内容

看一下这个目录结构:

/root /hoge go.mod go.sum main.go /test main_test.go /unit sub_test.go /fuga go.mod go.sum main.go /test main_test.go登录后复制