vburenin / ifacemaker

Generate interfaces from structure methods.
Apache License 2.0
320 stars 43 forks source link

Look into all module files to find all traces of structure methods. #3

Open vburenin opened 7 years ago

decibel commented 7 years ago

Possibly related to this... I have a package that's spread across multiple files, which means I have to feed all those files to ifacemaker with multiple -f's. That's obviously rather cumbersome (though marginally less painful via for f in *.go; do echo -n " -f $f"; done).

It would be nice if you could just point ifacemaker at either a package or directory.

vburenin commented 7 years ago

makes sense, it should not be hard. I may take a look during weekend.

ps. glad to see people from Austin ;)

slatermorgan commented 1 year ago

I have struct methods spread across multiple files, is there anyway to include them all when running ifacemaker?

vburenin commented 1 year ago

@slatermorgan Unfortunately it is not possible, however you may want to contribute this functionality as many find it useful.

slatermorgan commented 1 year ago

I actually found a slight workaround. As file accepts a glob you can run the following bash command.

ifacemaker -f "*.go" -s Struct -i Interface -p package

emfomy commented 1 year ago

Is there a way to exclude test and mock files?