英文:
How to find where is the import cycle in go code?
问题
我对这个错误感到厌烦。
main.go:10:5: 不允许循环导入
这个错误没有提供信息,不知道循环依赖在哪里,甚至没有告诉我哪个文件有问题。有没有办法可以找出Go语言中的循环依赖或依赖关系图?随着代码库的增大,很难推断出这个问题。
英文:
I am fed up with the error
main.go:10:5: import cycle not allowed
The bug does not give information, where is the dependency cycle and does not even tell which file is the problem. Is there a way I can find out the dependency cycle or dependency diagram in go? As the codebase goes large its very difficult to deduce this.
答案1
得分: 1
根据上面的评论,综合回答如下:
这是一个已知的问题,最近已修复,所以请留意新版本发布或从源代码编译go工具。
(贡献者:@MatrixFrog,@infantDev,@jnml和@nemo)
英文:
And the collective answer based on comments above:
Its a known issue, recently fixed so look out for a new release or compile the go tool from source.
(Contributed by: @MatrixFrog, @infantDev, @jnml and @nemo)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论