()
| 251 | } |
| 252 | |
| 253 | func (c *Collection) DisplayCanonicalURL() string { |
| 254 | us := c.CanonicalURL() |
| 255 | u, err := url.Parse(us) |
| 256 | if err != nil { |
| 257 | return us |
| 258 | } |
| 259 | p := u.Path |
| 260 | if p == "/" { |
| 261 | p = "" |
| 262 | } |
| 263 | d := u.Hostname() |
| 264 | d, _ = idna.ToUnicode(d) |
| 265 | return d + p |
| 266 | } |
| 267 | |
| 268 | // RedirectingCanonicalURL returns the fully-qualified canonical URL for the Collection, with a trailing slash. The |
| 269 | // hostName field needs to be populated for this to work correctly. |
nothing calls this directly
no test coverage detected