コード例 #1
0
// getAllRemoteResources will get try to get the dependencies from their respective repositories and put them
// in the final "destination" workspace directory.
func getAllRemoteResources(destination string, opencontrol common.OpenControl, getter Getter) error {
	// Get Certifications
	log.Println("Retrieving dependent certifications")
	err := getter.GetRemoteResources(destination, constants.DefaultCertificationsFolder,
		opencontrol.GetCertificationsDependencies())
	if err != nil {
		return err
	}
	// Get Standards
	log.Println("Retrieving dependent standards")
	err = getter.GetRemoteResources(destination, constants.DefaultStandardsFolder,
		opencontrol.GetStandardsDependencies())
	if err != nil {
		return err
	}
	// Get Components
	log.Println("Retrieving dependent components")
	err = getter.GetRemoteResources(destination, constants.DefaultComponentsFolder,
		opencontrol.GetComponentsDependencies())
	if err != nil {
		return err
	}
	return nil
}