【文件属性】:
文件名称:interfaces:Go的代码生成工具
文件大小:20KB
文件格式:ZIP
更新时间:2021-05-13 11:50:27
golang codegen golang-package golang-interface Go
介面
Go界面的代码生成工具。
该存储库中可用的工具:
cmd /接口
生成命名类型的接口。
安装
~ $ go get github.com/rjeczalik/interfaces/cmd/interfacer
用法
~ $ interfacer -help
Usage of interfacer:
-all
Include also unexported methods.
-as string
Generated interface name. (default "main.Interface")
-for string
Type to generate an interface for.
-o string
Output file. (default "-")
例子
手动生成
~ $
【文件预览】:
interfaces-master
----.goreleaser.yml(495B)
----.gitignore(266B)
----go.mod(111B)
----type_test.go(6KB)
----interface.go(5KB)
----struct.go(3KB)
----interfaces_test.go(746B)
----type.go(3KB)
----.travis.yml(271B)
----LICENSE(1KB)
----func.go(2KB)
----interfaces.go(583B)
----go.sum(723B)
----testdata()
--------aws-billing.csv(252B)
----example_test.go(2KB)
----README.md(6KB)
----build_test.go(2KB)
----appveyor.yml(587B)
----options.go(1KB)
----cmd()
--------interfacer()
--------structer()