-
Notifications
You must be signed in to change notification settings - Fork 158
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
Remove Provider.Watch
#45
Comments
The file provider A |
But the interface method is not used by Koanf (the struct) itself - it serves thus no purpose. See also: https://mobile.twitter.com/davecheney/status/942593128355192832?lang=en The file provider's Watch method is called directly (see README)! If we are expecting to call the watch (or whatever other) methods on the provider structs directly, it should be removed IMO. |
You're right. koanf internally has no use for |
Thank you for listening to my ideas! :) |
Method
Watch(func(event interface{}, err error)) error
is actually not used by Koanf (unlikeLoad
andReadBytes
) itself and serves no purpose except for adding bloat to providers who do not support Watching (e.g. env or flags). As an implementer of my ownProvider
I want to use a different watch mechanism with channels (instead of a callback) which means I have to implement two watchers, or not use channels.The text was updated successfully, but these errors were encountered: