config

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const ConPath = "config"
View Source
const DefaultConf = "default"
View Source
const EConf = "CONF"
View Source
const EEnv = "ENV"
View Source
const SliceMaxSize = 100
View Source
const TestSuffix = "_test"

Variables

This section is empty.

Functions

func GetConfDir added in v1.0.0

func GetConfDir() string

GetConfDir get config directory, fetch value from command line flag(-conf) first, then from environment variable(CONF)

func GetEnv

func GetEnv() string

GetEnv get environment, fetch value from command line flag(-env) first, then from environment variable(ENV), then use default value

func MustGetExecutableConfDir added in v1.0.0

func MustGetExecutableConfDir() string

func MustGetWorkDir added in v1.0.0

func MustGetWorkDir() string

func NewConfig

func NewConfig() (gone.Vampire, gone.GonerId, gone.GonerOption)

func ParseConfAnnotation added in v0.0.22

func ParseConfAnnotation(tag string) (key string, defaultVal string)

func Priest

func Priest(cemetery gone.Cemetery) error

Types

type ConfSetting added in v1.0.0

type ConfSetting struct {
	ConfigPath string
	ConfigName string
}

ConfSetting config settings, include config file dir path and config file name(do not include file extension)

func GetConfSettings added in v1.0.0

func GetConfSettings(isInTestKit bool) (configs []ConfSetting)

GetConfSettings get config settings

type Configure

type Configure = gone.Configure

Jump to

Keyboard shortcuts

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