func GetGitURL(ptrRepo, ptrRepoUser *string) (Password string) {
	u, err := url.Parse(*ptrRepo)
	if err != nil {
		return
	}
	*ptrRepo = strings.Replace(*ptrRepo, u.User.Username()+"@", "", 1)
	if *ptrRepoUser == "" {
		*ptrRepoUser = u.User.Username()
	}
	*ptrRepo = strings.Replace(*ptrRepo, gitHTTP, "", 1)
	*ptrRepo = strings.Replace(*ptrRepo, gitHTTPS, "", 1)
	*ptrRepo = gitHTTPS + *ptrRepo
	if *ptrRepoUser != "" {
		log.Print(gitPasswdPrompt)
		RepoPass, err := gopass.GetPasswdMasked()
		if err != nil {
			log.Println(errGitPasswd, err)
			os.Exit(1)
		}
		return string(RepoPass)
	}
	return ""
}
GetGitURL Format GI URL and parse/prompt user password
package utils
import (
	"log"
	"net/url"
	"os"
	"path/filepath"
	"regexp"
	"runtime"
	"strings"
	"unicode"
	"github.com/howeyc/gopass"
)
var gitURLPattern = regexp.MustCompile(`([^/]*)(?:.git)`)
func Contains(haystack []string, needle string) bool {
	for _, item := range haystack {
		if item == needle {
			return true
		}
	}
	return false
}
func PathMustExist(path string) {
	if fileExists, err := Exists(path); !fileExists {
		if err != nil {
			log.Fatal(errInvalidPath)
		}
	}
}
func GetConfigDir() (configDir string) {
	if strings.HasSuffix(os.Args[0], ".test") {  
		return ".." + string(os.PathSeparator) + ".." + string(os.PathSeparator) + "config" + string(os.PathSeparator)
	}
	userHomeDir, err := os.UserHomeDir()
	if err != nil {
		log.Fatal("Home directory doesn't exist", err)
	}
	cwd := MustGetED()
	overrideDir := string(os.PathSeparator) + ebConfFileDir + string(os.PathSeparator)
	localOverrideDir := cwd + overrideDir
	localOverrideFileCheck := localOverrideDir + ebConfFileName
	if fe, _ := Exists(localOverrideFileCheck); fe {
		configDir = localOverrideDir
		log.Println("Using local config directory: ", localOverrideDir)
	} else {
		switch runtime.GOOS {
		case "windows":
			configDir += ebWinConfFileDir
		case "linux":  
			configDir += overrideDir
		case "darwin":
			configDir += overrideDir
		}
		configDir = userHomeDir + configDir
	}
	return configDir
}
func MustGetED() string {
	ex, err := os.Executable()
	if err != nil {
		log.Fatal(err)
	}
	return filepath.Dir(ex)
}
func MustGetWD() string {
	cwd, err := os.Getwd()
	if err != nil {
		log.Fatal(err)
	}
	return cwd
}
func GetTargetType(GitStagedFlag, GitTrackedFlag bool) (targetType string) {
	if GitStagedFlag {
		targetType = Staged
	} else if GitTrackedFlag {
		targetType = Tracked
	} else {
		targetType = All
	}
	return targetType
}
func GetEnabledModulesMap(enableFlags []string, availableModules map[string]string) (enabledModules map[string]string) {
	enabledModules = make(map[string]string)
	if len(enableFlags) == 0 {
		return availableModules
	}
	for _, moduleName := range enableFlags {
		enabledModules[moduleName] = availableModules[moduleName]
	}
	return enabledModules
}
func GetDisplayList(levelNames []string) string {
	return "[ " + strings.Join(levelNames, " | ") + " ]"
}
func DeleteGit(ptrRepo string, path string) {
	if ptrRepo != "" {
		err := os.RemoveAll(path)
		if err != nil {
			log.Println(errGitDelete, err)
		}
	}
}
func GetGitRepo(gitURL string) (repository string) {
	if strings.Contains(gitURL, "github.com/") {
		u, err := url.Parse(gitURL)
		if err != nil {
			return
		}
		repository = strings.TrimPrefix(u.Path, "/")
	} else {
		items := gitURLPattern.FindStringSubmatch(gitURL)
		if len(items) > 1 {
			repository = items[1]
		}
	}
	return repository
}
func GetBBProject(bbURL string) (project string) {
	re := regexp.MustCompile(`(?:projects/)([^/]*)`)
	results := re.FindStringSubmatch(bbURL)  
	if len(results) < 1 {
		log.Println("Failed To Get BB Project from URL:", bbURL)
		os.Exit(1)
	} else {
		project = results[1]
	}
	return project
}
func ParseBBURL(bbURL string) (baseurl, path, project string) {
	u, err := url.Parse(bbURL)
	if err != nil {
		log.Println("Failed to parse Bitbucket URL")
		return
	}
	baseurl = u.Scheme + "://" + u.Host                
	parts := strings.Split(bbURL, "/projects/")        
	path = strings.Replace(parts[0], baseurl, "", -1)  
	return baseurl, path, GetBBProject(bbURL)
}
func GetGitProject(gitURL string) (project string) {
	u, err := url.Parse(gitURL)
	if err != nil {
		return
	}
	return strings.TrimPrefix(u.Path, "/")
}