阅读go项目源码,解决无法快速找到interface有哪些struct实现问题
阅读go项目源码时,不方便知道interface有哪些struct实现,很不方便。
list-interfaces这个工具,用来分析go项目源码,帮你快速找出interface有哪些struct实现。
list-interfaces使用
list-interfaces --codedir /appdev/gopath/src/github.com/contiv/netplugin \ --gopath /appdev/gopath \ --outputfile /tmp/result 参数说明 --codedir 要分析的代码目录 --gopath GOPATH环境变量目录 --outputfile 分析结果保存到该文件
输出样例:
interface item 在文件/appdev/gopath/src/github.com/contiv/netplugin/vendor/google.golang.org/grpc/transport/transport.go中 有2个struct实现了接口 struct windowUpdate 在文件/appdev/gopath/src/github.com/contiv/netplugin/vendor/google.golang.org/grpc/transport/control.go中 struct settings 在文件/appdev/gopath/src/github.com/contiv/netplugin/vendor/google.golang.org/grpc/transport/control.go中
项目源码仓库
https://git.oschina.net/jscode/list-interfaces
下载地址
如果你的系统是fedora25 x86_64或兼容的系统,可以下载已编译好的二进制包。
http://oog2gj1e8.bkt.clouddn.com/list-interfaces
原文地址:https://my.oschina.net/u/1263909/blog/880151
相关推荐
-
Jenkins: 执行 PowerShell 命令 服务器
2019-3-25
-
10分钟搭建Kubernetes容器集群平台(kubeadm) 服务器
2019-9-14
-
MySQL for update 服务器
2020-6-28
-
什么是僵尸进程,如何找到并杀掉僵尸进程? 服务器
2019-3-3
-
说说MySQL权限 服务器
2020-5-31
-
centos 关闭selinux 临时关闭selinux 报错 setenforce: setenforce() failed 服务器
2019-5-16
-
maven私服nexus上传第三方jar包以及下载 服务器
2019-9-11
-
软件架构万字漫谈:业务架构、应用架构与云基础架构 服务器
2019-9-1
-
史上最全的使用 gnome-screenshot 获取屏幕快照指南 服务器
2019-3-6
-
如何正确配置 Nginx+PHP 服务器
2019-3-10