config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolOrDefault

func GetBoolOrDefault(key string, defaultValue bool) bool

func GetIntOrDefault

func GetIntOrDefault(key string, defaultValue int) int

func GetString

func GetString(key string) string

func GetStringNotEmpty

func GetStringNotEmpty(key string) (string, error)

func GetStringOrDefault

func GetStringOrDefault(key, defaultValue string) string

func HomeDir

func HomeDir() string

HomeDir 当前用户的 $HOME 目录

func HostPath

func HostPath() string

HostPath 获取配置的虚拟目录

func HostPort

func HostPort() int

HostPort 获取配置的服务端口

func Init

func Init() error

Init 初始化配置 func Init(info *RainbowInfo) error {

func LogFilePrefix

func LogFilePrefix(cate string) string

LogFilePrefix 日志文件前缀

func LogLevel

func LogLevel() string

LogLevel 日志级别

func LogPath

func LogPath() string

LogPath 日志存放目录

func ReadKey

func ReadKey(key string, obj interface{})

ReadKey 根据节点名称从配置读取结构体

func RootDir

func RootDir() string

RootDir 应用所在根目录

Types

This section is empty.

Jump to

Keyboard shortcuts

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