koanf icon indicating copy to clipboard operation
koanf copied to clipboard

add WatchWithContext() funcs for various providers where possible

Open nilsocket opened this issue 2 months ago • 0 comments

This pull request closes issue: https://github.com/knadh/koanf/issues/340

Add WatchWithContext() func for following providers:

  • appconfig
  • consul
  • etcd
  • file
  • nats

Other modifications:

  • In file package calls to filepath.Clean() are removed as filepath.EvalSymlinks() will call Clean() on return.
  • Helper function, inputFromConfig() is written and called along with Provider... funcs. As it's possible to call Watch() and then Load() which would cause issues.

nilsocket avatar Oct 31 '25 09:10 nilsocket