config

package
v0.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigDirectory added in v0.1.15

func GetConfigDirectory() string

GetConfigDirectory returns the config directory for the executing user

func InitConfig

func InitConfig()

InitConfig reads in config file and ENV variables if set.

func SetConfigFile added in v0.1.18

func SetConfigFile(file string)

SetConfigFile set config name

func SetConfigName added in v0.1.18

func SetConfigName(name string)

SetConfigName set config name

Types

type Config added in v0.1.18

type Config struct {
	// CfgFile config file path
	CfgName string

	// CfgName config name
	CfgFile string
}

Config config options

func GetConfig added in v0.1.18

func GetConfig() *Config

GetConfig gets the global Config instance.

func (*Config) GetConfigDirectory added in v0.1.18

func (config *Config) GetConfigDirectory() string

GetConfigDirectory returns the config directory for the executing user

func (*Config) InitConfig added in v0.1.18

func (config *Config) InitConfig()

InitConfig reads in config file and ENV variables if set.

func (*Config) SetConfigFile added in v0.1.18

func (config *Config) SetConfigFile(file string)

SetConfigFile set config name

func (*Config) SetConfigName added in v0.1.18

func (config *Config) SetConfigName(name string)

SetConfigName set config name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL