Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNodeNotExists 配置节点不存在 ErrNodeNotExists = errors.New("node not exists") )
View Source
var Log map[string]*logrus.Logger
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
Configuration 应用配置
func (*Configuration) Bind ¶
func (conf *Configuration) Bind(node, key string, obj interface{}) error
Bind 将配置绑定到传入对象
node 其实是配置文件的文件名 key 是配置文件中的顶层key 具体可查看该方法的其他包的使用
Click to show internal directories.
Click to hide internal directories.