|
@@ -1,5 +1,5 @@
|
|
|
// Package urlutil provides helper function to check urls kind.
|
|
|
-// It supports http urls, git urls and transport url (tcp://, …)
|
|
|
+// It supports http and git urls.
|
|
|
package urlutil // import "github.com/docker/docker/pkg/urlutil"
|
|
|
|
|
|
import (
|
|
@@ -18,8 +18,7 @@ var (
|
|
|
//
|
|
|
// Going forward, no additional prefixes should be added, and users should
|
|
|
// be encouraged to use explicit URLs (https://github.com/user/repo.git) instead.
|
|
|
- "git": {"git://", "github.com/", "git@"},
|
|
|
- "transport": {"tcp://", "tcp+tls://", "udp://", "unix://", "unixgram://"},
|
|
|
+ "git": {"git://", "github.com/", "git@"},
|
|
|
}
|
|
|
urlPathWithFragmentSuffix = regexp.MustCompile(".git(?:#.+)?$")
|
|
|
)
|
|
@@ -37,11 +36,6 @@ func IsGitURL(str string) bool {
|
|
|
return checkURL(str, "git")
|
|
|
}
|
|
|
|
|
|
-// IsTransportURL returns true if the provided str is a transport (tcp, tcp+tls, udp, unix) URL.
|
|
|
-func IsTransportURL(str string) bool {
|
|
|
- return checkURL(str, "transport")
|
|
|
-}
|
|
|
-
|
|
|
func checkURL(str, kind string) bool {
|
|
|
for _, prefix := range validPrefixes[kind] {
|
|
|
if strings.HasPrefix(str, prefix) {
|