示例#1
0
func (e *Env) loadAttributes() {
	files, err := utils.AttributeFiles(e.path + spec.PATH_ATTRIBUTES)
	if err != nil {
		e.log.WithError(err).WithField("path", e.path+spec.PATH_ATTRIBUTES).Panic("Cannot load Attributes files")
	}
	e.attributes = attributes.MergeAttributesFiles(files)
	e.log.WithField("attributes", e.attributes).Debug("Attributes loaded")
}
示例#2
0
文件: env.go 项目: blablacar/ggn
func (e *Env) loadAttributes() {
	files, err := utils.AttributeFiles(e.path + PATH_ATTRIBUTES)
	if err != nil {
		logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Cannot load attribute files")
	}
	files, err = e.addIncludeFiles(files)
	if err != nil {
		logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Cannot load include files")
	}

	e.attributes = attributes.MergeAttributesFiles(files)
	logs.WithFields(e.fields).WithField("attributes", e.attributes).Debug("Attributes loaded")
}