Go构建错误:< dir>中没有非测试的Go文件; [英] Go build error: no non-test Go files in <dir>

查看:121
本文介绍了Go构建错误:< dir>中没有非测试的Go文件;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试从我的$ GOPATH / src中运行 go build ./...时出错。

Getting an error when trying to run go build ./... from my $GOPATH/src .

no non-test Go files in <dir>

错误是正确的,在< dir>中没有测试文件/ code>但是为什么会导致编译错误?

The error is correct there are no test files in <dir> but why is that causing a compile error? Is it a bug?

推荐答案

称它为错误……如果测试能够编译,则构建不会失败。归档在此处: https://github.com/golang/go/issues/22409

Calling it a bug… the build shouldn't fail if the tests compile. Filed here: https://github.com/golang/go/issues/22409

我提交的错误是 https://github.com/golang/go/issues/8279 似乎已被1.3破解。

The bug I filed was a duplicate of https://github.com/golang/go/issues/8279 looks like it was broken in 1.3.

这篇关于Go构建错误:&lt; dir&gt;中没有非测试的Go文件;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆