Copyright 2021 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package internal

import (
	

	
	
)

var vcsHostsWithThreeElementRepoName = map[string]bool{
	"bitbucket.org": true,
	"gitea.com":     true,
	"gitee.com":     true,
	"github.com":    true,
	"gitlab.com":    true,
}
CandidateModulePaths returns the potential module paths that could contain the fullPath, from longest to shortest. It returns nil if no valid module paths can be constructed.
func ( string) []string {
	if stdlib.Contains() {
		if  := module.CheckImportPath();  != nil {
			return nil
		}
		return []string{"std"}
	}
	var  []string
	for  := ;  != "." &&  != "/";  = path.Dir() {
		if  := module.CheckImportPath();  != nil {
			continue
		}
		 = append(, )
	}
	if len() == 0 {
		return nil
	}
	if !vcsHostsWithThreeElementRepoName[[len()-1]] {
		return 
	}
	if len() < 3 {
		return nil
	}
	return [:len()-2]