mirror of
https://github.com/golang/go
synced 2024-11-21 14:44:40 -07:00
godoc: canonicalize codewalk paths
R=rsc CC=golang-dev https://golang.org/cl/1729046
This commit is contained in:
parent
71675c6fa0
commit
4f340f5051
@ -15,7 +15,7 @@
|
||||
<div id="code-area">
|
||||
<div id="code-header" align="center">
|
||||
<a id="code-popout-link" href="" target="_blank">
|
||||
<img title="View code in new window" alt="Pop Out Code" src="popout.png" style="display: block; float: right;"/>
|
||||
<img title="View code in new window" alt="Pop Out Code" src="/doc/codewalk/popout.png" style="display: block; float: right;"/>
|
||||
</a>
|
||||
<select id="code-selector">
|
||||
{.repeated section File}
|
||||
|
@ -63,6 +63,11 @@ func codewalk(c *http.Conn, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Canonicalize the path and redirect if changed
|
||||
if redirect(c, r) {
|
||||
return
|
||||
}
|
||||
|
||||
b := applyTemplate(codewalkHTML, "codewalk", cw)
|
||||
servePage(c, "Codewalk: "+cw.Title, "", "", b)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user