3 // GitDetector implements Detector to detect Git SSH URLs such as
4 // git@host.com:dir1/dir2 and converts them to proper URLs.
5 type GitDetector struct{}
7 func (d *GitDetector) Detect(src, _ string) (string, bool, error) {
12 u, err := detectSSH(src)
20 // We require the username to be "git" to assume that this is a Git URL
21 if u.User.Username() != "git" {
25 return "git::" + u.String(), true, nil