示例#1
0
文件: grouper.go 项目: sqp/godock
// Default gives access to a field value.
//
func (conf *CDConfig) Default(group, name string) (valuer.Valuer, error) {
	e := conf.loadDefault()
	if e != nil {
		return nil, e
	}

	return keyfile.NewValuer(conf.def, group, name), nil
}
示例#2
0
文件: grouper.go 项目: sqp/godock
// Valuer gives access to a field value.
//
func (conf *CDConfig) Valuer(group, name string) valuer.Valuer {
	return keyfile.NewValuer(&conf.KeyFile, group, name)
}