govers icon indicating copy to clipboard operation
govers copied to clipboard

Basic build tag support

Open grindlemire opened this issue 7 years ago • 1 comments

Hi! This tool is great!

However I really needed to support easily and painlessly moving some imports inside build tagged files as well. I would ideally like to be able to specify any number of build tags and govers will rewrite the imports for anything without build tags or any of the build tags listed. However to do so would require using a more sophisticated flag parsing framework (I like go-flags). For now I decided to stick to a lower impact change that supports providing a single build tag if you want it.

grindlemire avatar Apr 10 '18 15:04 grindlemire

Thanks very much for this. AFAICS it allows multiple tags to be specified too.

As a possible addition or alternative to this, what do you think about the possibility of always considering all source files that are tagged with any known OS or architecture? That's what I do in my godeps tool (github.com/rogpeppe/godeps) and it seems to work reasonably well.

rogpeppe avatar Apr 11 '18 08:04 rogpeppe