func DependencyModulePinsForBucket(
	ctx context.Context,
	readBucket storage.ReadBucket,
) ([]ModulePin, error) {
	lockFile, err := buflock.ReadConfig(ctx, readBucket)
	if err != nil {
		return nil, fmt.Errorf("failed to read lock file: %w", err)
	}
	modulePins := make([]ModulePin, 0, len(lockFile.Dependencies))
	for _, dep := range lockFile.Dependencies {
		modulePin, err := NewModulePin(
			dep.Remote,
			dep.Owner,
			dep.Repository,
			"",
			dep.Commit,
			"",
			time.Time{},
		)
		if err != nil {
			return nil, err
		}
		modulePins = append(modulePins, modulePin)
	}
	// just to be safe
	SortModulePins(modulePins)
	if err := ValidateModulePinsUniqueByIdentity(modulePins); err != nil {
		return nil, err
	}
	return modulePins, nil
}
// DependencyModulePinsForBucket reads the module dependencies from the lock file in the bucket.
DependencyModulePinsForBucket reads the module dependencies from the lock file in the bucket.
// DependencyModulePinsForBucket reads the module dependencies from the lock file in the bucket .
func DependencyModulePinsForBucket(
	ctx context.Context,
	readBucket storage.ReadBucket,
) ([]ModulePin, error) {
	lockFile, err := buflock.ReadConfig(ctx, readBucket)
	if err != nil {
		return nil, fmt.Errorf("failed to read lock file: %w", err)
	}
	modulePins := make([]ModulePin, 0, len(lockFile.Dependencies))
	for _, dep := range lockFile.Dependencies {
		modulePin, err := NewModulePin(
			dep.Remote,
			dep.Owner,
			dep.Repository,
			"",
			dep.Commit,
			"",
			time.Time{},
		)
		if err != nil {
			return nil, err
		}
		modulePins = append(modulePins, modulePin)
	}
	SortModulePins(modulePins)
	if err := ValidateModulePinsUniqueByIdentity(modulePins); err != nil {
		return nil, err
	}
	return modulePins, nil
}
func DependencyModulePinsForBucket ( ctx context . Context , readBucket storage . ReadBucket , ) ( [ ] ModulePin , error ) { lockFile , err := buflock . ReadConfig ( ctx , readBucket ) if err != nil { return nil , fmt . Errorf ( " " , err ) } modulePins := make ( [ ] ModulePin , 0 , len ( lockFile . Dependencies ) ) for _ , dep := range lockFile . Dependencies { modulePin , err := NewModulePin ( dep . Remote , dep . Owner , dep . Repository , " " , dep . Commit , " " , time . Time { } , ) if err != nil { return nil , err } modulePins = append ( modulePins , modulePin ) } SortModulePins ( modulePins ) if err := ValidateModulePinsUniqueByIdentity ( modulePins ) ; err != nil { return nil , err } return modulePins , nil }
DependencyModulePinsForBucket reads the module dependencies from the lock file in the bucket.
DependencyModulePinsForBucket reads the module dependencies from the lock file in the bucket .
// just to be safe