Closed lestrrat closed 7 years ago
See the README.md regarding changes to the go-bindata command line interface:
"The CLI also remains backwards compatible but is considered deprecated and will not be updated."
All three of these are already possible if you use the package API. All you have to do is provide a Files
slice that contains the desired files with a struct that implements the File
interface. The second proposal is directly possible using the package API by setting the Ignore
field in the FindFilesOptions
struct.
The second proposal is already implemented in the CLI with the -ignore
flag which skips files that match the given regular expression in files.go. In your case you'd use something like:
go-bindata ... -ignore '.*-source$'
I'm closing this but feel free to reopen if you don't feel that sufficiently addresses your use case.
I was going to write
@tmthrgd so
go-bindata --help
needs updating?
then realized go-bindata in my $PATH was wrong (it was actually the realllllly old one :D) . Sorry for the false alarm!
I just had a situation where I want to create a new set of assets, but the directory contains generated files and their sources. For example, in the below listing,
path/to/files/foo
is the only needed file, andpath/to/files/foo-source
is only required for generating the former file.I want to limit the output to just
path/to/files/foo
. I would like to propose implementing something like the following1) define explicit white list
(One file name per line)
2) define black list pattern
(One regular expression per line to match file names against)
3) define white list pattern
(One regular expression per line to match file names against)