allow to change save/load/watch path

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-11-18 16:12:12 +03:00
parent 12720131b2
commit a70ada6de8
4 changed files with 48 additions and 12 deletions

View File

@@ -9,3 +9,15 @@ type pathKey struct{}
func Path(path string) config.Option {
return config.SetOption(pathKey{}, path)
}
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)
}