MCPcopy Create free account
hub / github.com/containers/image / SplitHostname

Function SplitHostname

docker/reference/reference.go:179–184  ·  view source on GitHub ↗

SplitHostname splits a named reference into a hostname and name string. If no valid hostname is found, the hostname is empty and the full value is returned as name Deprecated: Use Domain or Path

(named Named)

Source from the content-addressed store, hash-verified

177// is returned as name
178// Deprecated: Use Domain or Path
179func SplitHostname(named Named) (string, string) {
180 if r, ok := named.(namedRepository); ok {
181 return r.Domain(), r.Path()
182 }
183 return splitDomain(named.Name())
184}
185
186// Parse parses s and returns a syntactically valid Reference.
187// If an error was encountered it is returned, along with a nil Reference.

Callers 5

TrimNamedFunction · 0.85
TestReferenceParseFunction · 0.85
TestSplitHostnameFunction · 0.85
TestParseNamedFunction · 0.85

Calls 4

splitDomainFunction · 0.85
DomainMethod · 0.65
PathMethod · 0.65
NameMethod · 0.65

Tested by 4

TestReferenceParseFunction · 0.68
TestSplitHostnameFunction · 0.68
TestParseNamedFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…