func calculateSourcePath(goPath string, repo string) (repoPath string, err error) {
	pathParts, err := parseStandardURL(repo)
	if err != nil {
		pathParts, err = parseWeirdGitURL(repo)
		if err != nil {
			return
		}
	}

	if len(pathParts) < 2 {
		err = errors.New("Host and path required")
		return
	}

	pathParts = append([]string{goPath, "src"}, pathParts[:len(pathParts)-1]...)
	repoPath = path.Join(pathParts...)
	return
}
// calculateSourcePath works out the local filesystem path to directory above a given repo
calculateSourcePath works out the local filesystem path to directory above a given repo
// calculateSourcePath works out the local filesystem path to directory above a given repo
func calculateSourcePath(goPath string, repo string) (repoPath string, err error) {
	pathParts, err := parseStandardURL(repo)
	if err != nil {
		pathParts, err = parseWeirdGitURL(repo)
		if err != nil {
			return
		}
	}
	if len(pathParts) < 2 {
		err = errors.New("Host and path required")
		return
	}
	pathParts = append([]string{goPath, "src"}, pathParts[:len(pathParts)-1]...)
	repoPath = path.Join(pathParts...)
	return
}
func calculateSourcePath ( goPath string , repo string ) ( repoPath string , err error ) { pathParts , err := parseStandardURL ( repo ) if err != nil { pathParts , err = parseWeirdGitURL ( repo ) if err != nil { return } } if len ( pathParts ) < 2 { err = errors . New ( " " ) return } pathParts = append ( [ ] string { goPath , " " } , pathParts [ : len ( pathParts ) - 1 ] ... ) repoPath = path . Join ( pathParts ... ) return }
calculateSourcePath works out the local filesystem path to directory above a given repo
calculateSourcePath works out the local filesystem path to directory above a given repo