// SetProvider creates a new lock or replaces the existing lock for the given
// provider.
//
// SetProvider returns the newly-created provider lock object, which
// invalidates any ProviderLock object previously returned from Provider or
// SetProvider for the given provider address.
//
// The ownership of the backing array for the slice of hashes passes to this
// function, and so the caller must not read or write that backing array after
// calling SetProvider.
//
// Only lockable providers can be passed to this method. If you pass a
// non-lockable provider address then this function will panic. Use
// function ProviderIsLockable to determine whether a particular provider
// should participate in the version locking mechanism.
SetProvider creates a new lock or replaces the existing lock for the given
provider.

SetProvider returns the newly-created provider lock object, which
invalidates any ProviderLock object previously returned from Provider or
SetProvider for the given provider address.

The ownership of the backing array for the slice of hashes passes to this
function, and so the caller must not read or write that backing array after
calling SetProvider.

Only lockable providers can be passed to this method. If you pass a
non-lockable provider address then this function will panic. Use
function ProviderIsLockable to determine whether a particular provider
should participate in the version locking mechanism.
// SetProvider creates a new lock or replaces the existing lock for the given // provider . // // SetProvider returns the newly - created provider lock object which // invalidates any ProviderLock object previously returned from Provider or // SetProvider for the given provider address . // // The ownership of the backing array for the slice of hashes passes to this // function and so the caller must not read or write that backing array after // calling SetProvider . // // Only lockable providers can be passed to this method . If you pass a // non - lockable provider address then this function will panic . Use // function ProviderIsLockable to determine whether a particular provider // should participate in the version locking mechanism .
func (l *Locks) SetProvider(addr addrs.Provider, version getproviders.Version, constraints getproviders.VersionConstraints, hashes []getproviders.Hash) *ProviderLock {
	if !ProviderIsLockable(addr) {
		panic(fmt.Sprintf("Locks.SetProvider with non-lockable provider %s", addr))
	}
	new := NewProviderLock(addr, version, constraints, hashes)
	l.providers[new.addr] = new
	return new
}
func ( l * Locks ) SetProvider ( addr addrs . Provider , version getproviders . Version , constraints getproviders . VersionConstraints , hashes [ ] getproviders . Hash ) * ProviderLock { if ! ProviderIsLockable ( addr ) { panic ( fmt . Sprintf ( " " , addr ) ) } new := NewProviderLock ( addr , version , constraints , hashes ) l . providers [ new . addr ] = new return new }
SetProvider creates a new lock or replaces the existing lock for the given
provider.
SetProvider creates a new lock or replaces the existing lock for the given provider .