allow to override path in save/load/watch
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
12
options.go
12
options.go
@@ -44,3 +44,15 @@ type timeoutKey struct{}
|
||||
func Timeout(td time.Duration) config.Option {
|
||||
return config.SetOption(timeoutKey{}, td)
|
||||
}
|
||||
|
||||
func LoadPath(path string) config.LoadOption {
|
||||
return config.SetLoadOption(pathKey{}, path)
|
||||
}
|
||||
|
||||
func SavePath(path string) config.SaveOption {
|
||||
return config.SetSaveOption(pathKey{}, path)
|
||||
}
|
||||
|
||||
func WatchPath(path string) config.WatchOption {
|
||||
return config.SetWatchOption(pathKey{}, path)
|
||||
}
|
||||
|
Reference in New Issue
Block a user