godu
godu copied to clipboard
Wild card matching in .goduignore
Just thought I'd open an issue for what's mentioned in the readme. This should behave similar to .gitignore
.
Perhaps have a look at gobwas/glob. It should allow matching directories and file names.
Thanks @nochso, I think that when I was implementing godu
I hugely underestimated the canonical filepath and its accessibility throughout the code. That's something that needs to be solved before this (and #14) can be implemented.
I usually stick to path/filepath
which has worked fine so far. Then again, I'm not entirely sure what you mean.
godu
is now prepared for the functionality to be implemented here: https://github.com/viktomas/godu/blob/master/core/file_walker.go#L43
It is free for taking if someone wants to implement the logic. Please thumb up this comment if you'd like to have more advanced .goduignore
parsing and matching.
The whole logic of .goduignore
file is now stored in here https://github.com/viktomas/godu/blob/master/ignore.go#L37-L47 The wildcard matching could be implemented there.