mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 01:46:23 +00:00
Delete some dead code and fix nits.
This commit is contained in:
@@ -72,19 +72,6 @@ func (x *RepoSpec) Cleaner(fSys fs.FileSystem) func() error {
|
||||
return func() error { return fSys.RemoveAll(x.cloneDir.String()) }
|
||||
}
|
||||
|
||||
// IsRepoUrl checks if a string is likely a github repo Url.
|
||||
func IsRepoUrl(arg string) bool {
|
||||
arg = strings.ToLower(arg)
|
||||
return !filepath.IsAbs(arg) &&
|
||||
(strings.HasPrefix(arg, "git::") ||
|
||||
strings.HasPrefix(arg, "gh:") ||
|
||||
strings.HasPrefix(arg, "ssh:") ||
|
||||
strings.HasPrefix(arg, "github.com") ||
|
||||
strings.HasPrefix(arg, "git@") ||
|
||||
strings.Index(arg, "github.com/") > -1 ||
|
||||
isAzureHost(arg) || isAWSHost(arg))
|
||||
}
|
||||
|
||||
// From strings like git@github.com:someOrg/someRepo.git or
|
||||
// https://github.com/someOrg/someRepo?ref=someHash, extract
|
||||
// the parts.
|
||||
@@ -104,11 +91,6 @@ func NewRepoSpecFromUrl(n string) (*RepoSpec, error) {
|
||||
path: path, ref: gitRef}, nil
|
||||
}
|
||||
|
||||
func NewRepoSpec(
|
||||
raw string, cloneDir fs.ConfirmedDir, path string) *RepoSpec {
|
||||
return &RepoSpec{raw: raw, cloneDir: cloneDir, path: path}
|
||||
}
|
||||
|
||||
const (
|
||||
refQuery = "?ref="
|
||||
gitSuffix = ".git"
|
||||
|
||||
Reference in New Issue
Block a user