allow to chage save/load/watch path

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

View File

@@ -31,6 +31,18 @@ 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)
}
type roleIDKey struct{}
func RoleID(role string) config.Option {