Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Recursive reload from a directory #10

Open
zhouzhuojie opened this issue Feb 14, 2020 · 1 comment
Open

[Feature Request] Recursive reload from a directory #10

zhouzhuojie opened this issue Feb 14, 2020 · 1 comment

Comments

@zhouzhuojie
Copy link

Hi,

Wondering if reload can support recursive subdirectory from a directory.

reload/reload.go

Lines 54 to 55 in ed43622

// Dir is an additional directory to watch for changes. Directories are watched
// non-recursively.

@arp242
Copy link
Contributor

arp242 commented Feb 15, 2020

Yeah, don't mind accepting patches for this. Maybe as a new ListDirs(path string, cb func()) []Dir function which scans a directory. You can then do reload.Do(log.Print, cb, reload.ListDirs("./tpl", reloadTpl)...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants