Documentation ¶
Index ¶
- type Options
- func (o *Options) ConfigName(configName string) *Options
- func (o *Options) ConfigNameInPath(configName string) *Options
- func (o *Options) Enumerate() []string
- func (o *Options) EnumeratePath() []string
- func (o *Options) EnumerateSystem() []string
- func (o *Options) EnumerateUser() []string
- func (o *Options) FS(fs fs.FS) *Options
- func (o *Options) IncludeMissing(include bool) *Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options contains the enumeration options for config files
func New ¶
Create a new config file enumerator for the provided app name. The app name must be a valid path segment.
func (*Options) ConfigName ¶
ConfigName overrides the default config file name of appName.conf
func (*Options) ConfigNameInPath ¶
ConfigNameInPath overrides the default in-path config file name of .appName
func (*Options) Enumerate ¶
Enumerate generates a list of config files present in the system. It is ordered system config files, user config files, path config from root to the current working directory.
func (*Options) EnumeratePath ¶
EnumeratePath generates a list of config files in the current working dir or it's parents. May be nil or empty.
func (*Options) EnumerateSystem ¶
EnumerateSystem generates a list of system config files. May be nil or empty.
func (*Options) EnumerateUser ¶
EnumerateUser generates a list of user config files. May be nil or empty.
func (*Options) IncludeMissing ¶
IncludeMissing defines if missing files should still be present in the config file list