Read the Go Project source code, solve the problem that can't quickly find out which interface have the struct implementation

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Read the Go Project source code, it is inconvenient to know what the interface is the implementation of the struct, very inconvenient.

List-interfaces This tool, used to analyze the Go Project source code, to help you quickly find out what the interface of the struct implementation.

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中

Project Source Repository

Https://git.oschina.net/jscode/list-interfaces

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.