func ModuleReferenceForString(path string) (ModuleReference, error) {
	remote, owner, repository, reference, err := parseModuleReferenceComponents(path)
	if err != nil {
		return nil, err
	}
	if reference == "" {
		// Default to the main branch if a ':' separator was not specified.
		reference = MainBranch
	}
	return NewModuleReference(remote, owner, repository, reference)
}
// ModuleReferenceForString returns a new ModuleReference for the given string.
// If a branch or commit is not provided, the "main" branch is used.
//
// This parses the path in the form remote/owner/repository{:branch,:commit}.
ModuleReferenceForString returns a new ModuleReference for the given string.
If a branch or commit is not provided, the "main" branch is used.

This parses the path in the form remote/owner/repository{:branch,:commit}.
// ModuleReferenceForString returns a new ModuleReference for the given string . // If a branch or commit is not provided the " main " branch is used . // // This parses the path in the form remote / owner / repository { : branch : commit } .
func ModuleReferenceForString(path string) (ModuleReference, error) {
	remote, owner, repository, reference, err := parseModuleReferenceComponents(path)
	if err != nil {
		return nil, err
	}
	if reference == "" {
		reference = MainBranch
	}
	return NewModuleReference(remote, owner, repository, reference)
}
func ModuleReferenceForString ( path string ) ( ModuleReference , error ) { remote , owner , repository , reference , err := parseModuleReferenceComponents ( path ) if err != nil { return nil , err } if reference == " " { reference = MainBranch } return NewModuleReference ( remote , owner , repository , reference ) }
ModuleReferenceForString returns a new ModuleReference for the given string.
ModuleReferenceForString returns a new ModuleReference for the given string .
// Default to the main branch if a ':' separator was not specified.