英文:
how to represent relationship between entities in Go?
问题
有一个大型的Golang项目,分为许多包。我想要可视化它们之间的关系,以更好地理解项目的结构。首先想到的是依赖关系图。如何构建它呢?
另外,我还想找出所有未使用的方法和结构。
英文:
There is a large project on Golang which divided into many packages. I want to visualize the relationship between its entities to better understand the structure of the project. The first thing that comes to mind - the dependency graph classes. How to build it?
PS:
And I want find all unused method's / structures
答案1
得分: 2
你搜索的最接近的工具(尽管没有图表功能)可能是**go oracle**。
它可以嵌入在以下编辑器中:
我还喜欢使用测试用例来计算代码覆盖率,这也有助于找出未使用的方法。
英文:
The tool closest to what you search (but without the diagram feature though) would be go oracle
It can be embedded in:
- Atom with atom.io go-oracle package
- SublimeText with the
waigani/GoOracle
plugin
I also like to use test cases in order to compute a code coverage, which also helps to pinpoint unused methods.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论