This is a creation in Article, where the information may have evolved or changed.
When reading the Go Project source code, such as Contiv, it is inconvenient to know what interface are implemented. A tool list-interfaces was developed to analyze the source code of the Go project to find out which struct implementations are interface.
Project Source Repository
Https://git.oschina.net/jscode/list-interfaces
List-interfaces use
list-interfaces --codedir /appdev/gopath/src/github.com/contiv/netplugin \--gopath /appdev/gopath \--outputfile /tmp/result参数说明--codedir 要分析的代码目录--gopath GOPATH环境变量目录--outputfile 分析结果保存到该文件
Sample output:
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中
Download Address
If your system is fedora25 x86_64 or a compatible system, you can download the compiled binary package.
Http://oog2gj1e8.bkt.clouddn.com/list-interfaces