ifacemaker

Generate interfaces from structure methods in Go code

brewmacoslinux
Try with needOr install directly
Source

About

Generate interfaces from structure methods

Commands

ifacemaker

Examples

Generate interface from a struct in a file$ ifacemaker -file myfile.go -struct MyStruct -iface MyInterface
Generate interface and output to a specific file$ ifacemaker -file myfile.go -struct MyStruct -iface MyInterface -o interfaces.go
Generate interface with package name specification$ ifacemaker -file myfile.go -struct MyStruct -iface MyInterface -pkg mypackage