vburenin / ifacemaker

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

Make the maker package API cleaner #24

Closed DenLilleMand closed 5 years ago

DenLilleMand commented 5 years ago

Maybe the maker.MakeInterface method should be the only public method in the package actually?

With args.Comment, args.PkgName, args.IfaceName, args.IfaceComment, args.Files

being the only arguments?

In my world it looks like you need to know how to use the input files to convert them to the allMethods and allImports in order to use the library.

@vburenin ?

vburenin commented 5 years ago

Hi Matti,

ifacemaker is not exactly designed to be a library. In fact it was just an hour effort to rid off annoying manual interface synchronization with actual structure API changes as well as an initial attempt to understand how AST parser works in Go ;) If I built it from scratch right now, I would implement it completely differently, however, it also would be a lot more complex.

Nevertheless, your comment is completely reasonable and you are welcome to address it.

DenLilleMand commented 5 years ago

I didn't have the time anyway.

vburenin commented 5 years ago

You have it, this feature is simply not a priority ;)