v1

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

@author fenglei Config 支持toml和yaml格式,一次加载一个文件

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(configMap map[string]interface{}, key string) interface{}

GetConfig 获取配置 configMap: 配置map(从 NewConfig 返回) key: 配置键名(不区分大小写)

func NewConfig

func NewConfig(configPath string) (configMap map[string]interface{}, err error)

NewConfig 初始化配置v1版本 configPath: 配置文件路径,支持 .toml、.yaml、.yml 格式 返回配置map,如果需要热更新,配置会自动重新加载到 configMap 中

Types

This section is empty.

Jump to

Keyboard shortcuts

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