Converts interface methods to standalone function types. This is just a proof of concept.
Example:
From
type MyInterface interface {
Foo(val string) error
Bar() (int, error)
}
To
type Foo func(val string) error
type Bar func() (int, error)
Usage:
Default args: Scan the current directory (.
) for a go package and write output to ./functypes/
:
functypes
Set args:
functypes --pkg-path /path/to/go/package/dir --out-dir /path/to/output/dir