micro-config-file/options.go
Vasiliy Tolstov a70ada6de8 allow to change save/load/watch path
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-11-18 16:12:12 +03:00

24 lines
458 B
Go

package file
import (
"go.unistack.org/micro/v3/config"
)
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)
}