func ValidateModuleReferencesUniqueByIdentity(moduleReferences []ModuleReference) error {
	seenModuleReferences := make(map[string]struct{})
	for _, moduleReference := range moduleReferences {
		moduleIdentityString := moduleReference.IdentityString()
		if _, ok := seenModuleReferences[moduleIdentityString]; ok {
			return fmt.Errorf("module %s appeared twice", moduleIdentityString)
		}
		seenModuleReferences[moduleIdentityString] = struct{}{}
	}
	return nil
}
// ValidateModuleReferencesUniqueByIdentity returns an error if the module references contain any duplicates.
//
// This only checks remote, owner, repository.
ValidateModuleReferencesUniqueByIdentity returns an error if the module references contain any duplicates.

This only checks remote, owner, repository.
// ValidateModuleReferencesUniqueByIdentity returns an error if the module references contain any duplicates . // // This only checks remote owner repository .
func ValidateModuleReferencesUniqueByIdentity(moduleReferences []ModuleReference) error {
	seenModuleReferences := make(map[string]struct{})
	for _, moduleReference := range moduleReferences {
		moduleIdentityString := moduleReference.IdentityString()
		if _, ok := seenModuleReferences[moduleIdentityString]; ok {
			return fmt.Errorf("module %s appeared twice", moduleIdentityString)
		}
		seenModuleReferences[moduleIdentityString] = struct{}{}
	}
	return nil
}
func ValidateModuleReferencesUniqueByIdentity ( moduleReferences [ ] ModuleReference ) error { seenModuleReferences := make ( map [ string ] struct { } ) for _ , moduleReference := range moduleReferences { moduleIdentityString := moduleReference . IdentityString ( ) if _ , ok := seenModuleReferences [ moduleIdentityString ] ; ok { return fmt . Errorf ( " " , moduleIdentityString ) } seenModuleReferences [ moduleIdentityString ] = struct { } { } } return nil }
ValidateModuleReferencesUniqueByIdentity returns an error if the module references contain any duplicates.
ValidateModuleReferencesUniqueByIdentity returns an error if the module references contain any duplicates .