2021-05-21 11:50:40 +00:00
|
|
|
package config
|
|
|
|
|
|
|
|
type opts struct {
|
|
|
|
path string
|
|
|
|
}
|
|
|
|
|
|
|
|
func defaultOpts() *opts {
|
|
|
|
return new(opts)
|
|
|
|
}
|
|
|
|
|
2022-04-21 11:28:05 +00:00
|
|
|
// Option allows to set an optional parameter of the Config.
|
2021-05-21 11:50:40 +00:00
|
|
|
type Option func(*opts)
|
|
|
|
|
2022-04-21 11:28:05 +00:00
|
|
|
// WithConfigFile returns an option to set the system path
|
2021-05-21 11:50:40 +00:00
|
|
|
// to the configuration file.
|
|
|
|
func WithConfigFile(path string) Option {
|
|
|
|
return func(o *opts) {
|
|
|
|
o.path = path
|
|
|
|
}
|
|
|
|
}
|