config

package
v0.0.0-...-d31617f Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Env = "prod"

Functions

func GetConfigMap

func GetConfigMap(key string) map[string]interface{}

根据配置节点key获取配置的map,key==""时获取所有配置

func GetSubConfig

func GetSubConfig(key string) *viper.Viper

获取子节点的配置,如kafka,mysql,sqlserver...

func IsSet

func IsSet(key string) bool

是否配置了子节点

func UnmarshalKey

func UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error

获取子节点配置,对象化

Types

This section is empty.

Jump to

Keyboard shortcuts

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