Delete hashicorp cloner.

This commit is contained in:
jregan
2018-11-22 16:54:23 -08:00
parent 7c1277f24c
commit a40c2502de
238 changed files with 4 additions and 62987 deletions

View File

@@ -18,14 +18,12 @@ package loader
import (
"bytes"
"github.com/pkg/errors"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/hashicorp/go-getter"
"github.com/pkg/errors"
)
// gitCloner is a function that can clone a git repo.
@@ -133,30 +131,3 @@ func peelQuery(arg string) (string, string) {
}
return arg, ""
}
func hashicorpGitCloner(repoUrl string) (
checkoutDir string, pathInCoDir string, err error) {
dir, err := makeTmpDir()
if err != nil {
return
}
checkoutDir = filepath.Join(dir, "repo")
url, pathInCoDir := getter.SourceDirSubdir(repoUrl)
err = checkout(url, checkoutDir)
return
}
// Checkout clones a github repo with specified commit/tag/branch
func checkout(url, dir string) error {
pwd, err := os.Getwd()
if err != nil {
return err
}
client := &getter.Client{
Src: url,
Dst: dir,
Pwd: pwd,
Mode: getter.ClientModeDir,
}
return client.Get()
}