// CollectVariables Collect all the variables from the specified sources
CollectVariables Collect all the variables from the specified sources
// CollectVariables Collect all the variables from the specified sources
func CollectVariables(variables []VariableSource) *properties.Properties {
	numSources := len(variables)
	props := properties.NewProperties()
	if numSources > 0 {
		for _, variable := range variables {
			if len(variable.File) > 0 {
				fileProperties := properties.NewProperties()
				err := fileProperties.Load(variable.File)
				if err != nil {
					log.Debugf("Error loading properties from file %v", variable.File)
					continue
				}
				props.Merge(fileProperties)
			} else {
				props.Set(variable.Name, variable.Value)
			}
		}
	}
	return props
}
func CollectVariables ( variables [ ] VariableSource ) * properties . Properties { numSources := len ( variables ) props := properties . NewProperties ( ) if numSources > 0 { for _ , variable := range variables { if len ( variable . File ) > 0 { fileProperties := properties . NewProperties ( ) err := fileProperties . Load ( variable . File ) if err != nil { log . Debugf ( " " , variable . File ) continue } props . Merge ( fileProperties ) } else { props . Set ( variable . Name , variable . Value ) } } } return props }
CollectVariables Collect all the variables from the specified sources
CollectVariables Collect all the variables from the specified sources