You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: git_protocol.go
    path of file: ./repos/docker-ce/components/cli/vendor/github.com/moby/buildkit/util/gitutil
    
    the code of the file until where you have to start completion: package gitutil

import (
	"strings"

	"github.com/moby/buildkit/util/sshutil"
)

const (
	HTTPProtocol = iota + 1
	HTTPSProtocol
	SSHProtocol
	GitProtocol
	UnknownProtocol
)

// ParseProtocol parses a git URL and returns the remote url and protocol type
func ParseProtocol(remote string) (string, int) {
	prefixes := map[string]int{
		"http://":  HTTPProtocol,
    
func ParseProtocol(remote string) (string, int) {
	prefixes := map[string]int{
		"http://":  HTTPProtocol,
		"https://": HTTPSProtocol,
		"git://":   GitProtocol,
		"ssh://":   SSHProtocol,
	}
	protocolType := UnknownProtocol
	for prefix, potentialType := range prefixes {
		if strings.HasPrefix(remote, prefix) {
			remote = strings.TrimPrefix(remote, prefix)
			protocolType = potentialType
		}
	}

	if protocolType == UnknownProtocol && sshutil.IsImplicitSSHTransport(remote) {
		protocolType = SSHProtocol
	}

	// remove name from ssh
	if protocolType == SSHProtocol {
		parts := strings.SplitN(remote, "@", 2)
		if len(parts) == 2 {
			remote = parts[1]
		}
	}

	return remote, protocolType
}