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)
| 177 | // is returned as name |
| 178 | // Deprecated: Use Domain or Path |
| 179 | func 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. |
searching dependent graphs…