// DiscoverVersions creates a VersionEnclosure containing all Go modules in the Repository. The version of each module
// is determined by the provided VersionSelector.
DiscoverVersions creates a VersionEnclosure containing all Go modules in the Repository. The version of each module
is determined by the provided VersionSelector.
// DiscoverVersions creates a VersionEnclosure containing all Go modules in the Repository . The version of each module // is determined by the provided VersionSelector .
func (r *Repository) DiscoverVersions(selector VersionSelector) (VersionEnclosure, map[string]VersionBump, error) {
	modules, err := discoverModules(r.RootPath)
	if err != nil {
		return VersionEnclosure{}, nil, fmt.Errorf("failed to discover versions: %v", err)
	}
	packages, err := packages(r.golist, modules)
	if err != nil {
		return VersionEnclosure{}, nil, fmt.Errorf("failed to discover versions: %v", err)
	}
	enc, bumps, err := r.discoverVersions(modules, selector)
	if err != nil {
		return VersionEnclosure{}, nil, fmt.Errorf("failed to discover versions: %v", err)
	}
	hashes, err := r.ModuleHashes(enc)
	if err != nil {
		return VersionEnclosure{}, nil, fmt.Errorf("failed to discover versions: %v", err)
	}
	err = enc.updateHashes(hashes)
	if err != nil {
		return VersionEnclosure{}, nil, fmt.Errorf("failed to discover versions: %v", err)
	}
	enc.Packages = packages
	return enc, bumps, nil
}
func ( r * Repository ) DiscoverVersions ( selector VersionSelector ) ( VersionEnclosure , map [ string ] VersionBump , error ) { modules , err := discoverModules ( r . RootPath ) if err != nil { return VersionEnclosure { } , nil , fmt . Errorf ( " " , err ) } packages , err := packages ( r . golist , modules ) if err != nil { return VersionEnclosure { } , nil , fmt . Errorf ( " " , err ) } enc , bumps , err := r . discoverVersions ( modules , selector ) if err != nil { return VersionEnclosure { } , nil , fmt . Errorf ( " " , err ) } hashes , err := r . ModuleHashes ( enc ) if err != nil { return VersionEnclosure { } , nil , fmt . Errorf ( " " , err ) } err = enc . updateHashes ( hashes ) if err != nil { return VersionEnclosure { } , nil , fmt . Errorf ( " " , err ) } enc . Packages = packages return enc , bumps , nil }
DiscoverVersions creates a VersionEnclosure containing all Go modules in the Repository.
DiscoverVersions creates a VersionEnclosure containing all Go modules in the Repository .