func PutDependencyModulePinsToBucket(
	ctx context.Context,
	writeBucket storage.WriteBucket,
	modulePins []ModulePin,
) error {
	if err := ValidateModulePinsUniqueByIdentity(modulePins); err != nil {
		return err
	}
	SortModulePins(modulePins)
	lockFile := &buflock.Config{
		Dependencies: make([]buflock.Dependency, 0, len(modulePins)),
	}
	for _, pin := range modulePins {
		lockFile.Dependencies = append(
			lockFile.Dependencies,
			buflock.Dependency{
				Remote:     pin.Remote(),
				Owner:      pin.Owner(),
				Repository: pin.Repository(),
				Commit:     pin.Commit(),
			},
		)
	}
	return buflock.WriteConfig(ctx, writeBucket, lockFile)
}
// PutDependencyModulePinsToBucket writes the module dependencies to the write bucket in the form of a lock file.
PutDependencyModulePinsToBucket writes the module dependencies to the write bucket in the form of a lock file.
// PutDependencyModulePinsToBucket writes the module dependencies to the write bucket in the form of a lock file .
func PutDependencyModulePinsToBucket(
	ctx context.Context,
	writeBucket storage.WriteBucket,
	modulePins []ModulePin,
) error {
	if err := ValidateModulePinsUniqueByIdentity(modulePins); err != nil {
		return err
	}
	SortModulePins(modulePins)
	lockFile := &buflock.Config{
		Dependencies: make([]buflock.Dependency, 0, len(modulePins)),
	}
	for _, pin := range modulePins {
		lockFile.Dependencies = append(
			lockFile.Dependencies,
			buflock.Dependency{
				Remote:     pin.Remote(),
				Owner:      pin.Owner(),
				Repository: pin.Repository(),
				Commit:     pin.Commit(),
			},
		)
	}
	return buflock.WriteConfig(ctx, writeBucket, lockFile)
}
func PutDependencyModulePinsToBucket ( ctx context . Context , writeBucket storage . WriteBucket , modulePins [ ] ModulePin , ) error { if err := ValidateModulePinsUniqueByIdentity ( modulePins ) ; err != nil { return err } SortModulePins ( modulePins ) lockFile := & buflock . Config { Dependencies : make ( [ ] buflock . Dependency , 0 , len ( modulePins ) ) , } for _ , pin := range modulePins { lockFile . Dependencies = append ( lockFile . Dependencies , buflock . Dependency { Remote : pin . Remote ( ) , Owner : pin . Owner ( ) , Repository : pin . Repository ( ) , Commit : pin . Commit ( ) , } , ) } return buflock . WriteConfig ( ctx , writeBucket , lockFile ) }
PutDependencyModulePinsToBucket writes the module dependencies to the write bucket in the form of a lock file.
PutDependencyModulePinsToBucket writes the module dependencies to the write bucket in the form of a lock file .