config

package
v0.0.0-...-040cd8a Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CfgType = "yaml"
	CfgName = "config"
	Project = "tikdog"
	Debug   = true
	Mode    = "dev"
	Home    = xerror.PanicStr(filepath.Abs(filepath.Dir("")))

	// RunMode 项目运行环境
	RunMode = struct {
		Dev     string
		Test    string
		Stag    string
		Prod    string
		Release string
	}{
		Dev:     "dev",
		Test:    "test",
		Stag:    "stag",
		Prod:    "prod",
		Release: "release",
	}
)

默认的全局配置

Functions

func Decode

func Decode(name string, fn interface{}) (err error)

Decode decode config data

func GetDefault

func GetDefault() string

func ScriptPath

func ScriptPath() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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