MCPcopy
hub / github.com/git-lfs/git-lfs / portForURL

Function portForURL

config/url_config.go:168–183  ·  view source on GitHub ↗
(u *url.URL)

Source from the content-addressed store, hash-verified

166}
167
168func portForURL(u *url.URL) string {
169 port := u.Port()
170 if port != "" {
171 return port
172 }
173 switch u.Scheme {
174 case "http":
175 return "80"
176 case "https":
177 return "443"
178 case "ssh":
179 return "22"
180 default:
181 return ""
182 }
183}
184
185// compareHosts compares a hostname with a configuration hostname to determine
186// a match. It returns an integer indicating the strength of the match, or 0 if

Callers 1

getAllMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected