Skip to content

eaardal/functypes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Functypes

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published