func addGeneration(models map[string]*ControllerModels) error {
	changes := false
	for _, cm := range models {
		for name, m := range cm.Models {
			if m.ActiveBranch == "" {
				changes = true
				m.ActiveBranch = model.GenerationMaster
				cm.Models[name] = m
			}
		}
	}
	if changes {
		return WriteModelsFile(models)
	}
	return nil
}
// addGeneration add missing generation version data if necessary.
// Default to 'current'.
addGeneration add missing generation version data if necessary.
Default to 'current'.
// addGeneration add missing generation version data if necessary . // Default to ' current ' .
func addGeneration(models map[string]*ControllerModels) error {
	changes := false
	for _, cm := range models {
		for name, m := range cm.Models {
			if m.ActiveBranch == "" {
				changes = true
				m.ActiveBranch = model.GenerationMaster
				cm.Models[name] = m
			}
		}
	}
	if changes {
		return WriteModelsFile(models)
	}
	return nil
}
func addGeneration ( models map [ string ] * ControllerModels ) error { changes := false for _ , cm := range models { for name , m := range cm . Models { if m . ActiveBranch == " " { changes = true m . ActiveBranch = model . GenerationMaster cm . Models [ name ] = m } } } if changes { return WriteModelsFile ( models ) } return nil }
addGeneration add missing generation version data if necessary.
addGeneration add missing generation version data if necessary .