阅读go项目源码时,不方便知道interface有哪些struct实现,很不方便。
list-interfaces这个工具,用来分析go项目源码,帮你快速找出interface有哪些struct实现。
list-interfaces使用
输出样例:
- 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或兼容的系统,可以下载已编译好的二进制包。