// UnmarshalDynamicVars un-marshalls the given dynamic vars file.
UnmarshalDynamicVars un-marshalls the given dynamic vars file.
// UnmarshalDynamicVars un - marshalls the given dynamic vars file .
func UnmarshalDynamicVars(dynamicVarsPath string) error {
	clogger.Debug("")
	clogger.Debug("Resetting dynamic vars.")
	dynamicVars = DynamicVars{}
	clogger.Debug("Checking dynamic vars file")
	if _, err := os.Stat(dynamicVarsPath); os.IsNotExist(err) {
		return err
	}
	clogger.Debug("Evaluate dynamic vars")
	evaluatedDynamicVarsFilePath, err := ParseTemplate(dynamicVarsPath)
	if err != nil {
		return err
	}
	dynamicVarsData, err := ioutil.ReadFile(evaluatedDynamicVarsFilePath)
	if err != nil {
		return err
	}
	clogger.Debug("Populate dynamic vars")
	err = yaml.UnmarshalStrict(dynamicVarsData, &dynamicVars)
	if err != nil {
		return err
	}
	clogger.Debug("Parsed dynamic vars")
	return nil
}
func UnmarshalDynamicVars ( dynamicVarsPath string ) error { clogger . Debug ( " " ) clogger . Debug ( " " ) dynamicVars = DynamicVars { } clogger . Debug ( " " ) if _ , err := os . Stat ( dynamicVarsPath ) ; os . IsNotExist ( err ) { return err } clogger . Debug ( " " ) evaluatedDynamicVarsFilePath , err := ParseTemplate ( dynamicVarsPath ) if err != nil { return err } dynamicVarsData , err := ioutil . ReadFile ( evaluatedDynamicVarsFilePath ) if err != nil { return err } clogger . Debug ( " " ) err = yaml . UnmarshalStrict ( dynamicVarsData , & dynamicVars ) if err != nil { return err } clogger . Debug ( " " ) return nil }
UnmarshalDynamicVars un-marshalls the given dynamic vars file.
UnmarshalDynamicVars un - marshalls the given dynamic vars file .
// Reset dynamicVars global var. // Check dynamic vars file. // Evaluate dynamic vars. // Populate dynamic vars.