sflags icon indicating copy to clipboard operation
sflags copied to clipboard

ast flagset parser to generate sflags structs

Open roscopecoltran opened this issue 6 years ago • 0 comments

Hi,

Hope you are all well !

I am using amalgomate, a go tool for combining multiple different main packages into a single program or library, and I would like to export flags from repacked packages and wrap them with your package, so I can get more details info while printing the help of the repacked package. (Feature actually missing in the current amalgomate version)

Is there a tool allowing to convert a flagset from a package by parsing the ast in order to insert a sflags structs and import your package ?

It could be done here: https://github.com/palantir/amalgomate/blob/master/amalgomate/astfuncs.go#L121-L133

Thanks for any insights.

Cheers, Rosco

roscopecoltran avatar Sep 26 '18 18:09 roscopecoltran