1
0
mirror of https://github.com/golang/go synced 2024-11-25 06:57:58 -07:00

- added link to sources

- renamed listing.html -> dirList.html
  (there is a dirs.html already, it should probably have a better name, too)

R=rsc
http://go/go-review/1025020
This commit is contained in:
Robert Griesemer 2009-11-07 21:24:48 -08:00
parent 171ef39949
commit 642caacfa3
3 changed files with 6 additions and 5 deletions

View File

@ -97,6 +97,7 @@
<li class="navhead">Programming</li> <li class="navhead">Programming</li>
<li><a href="/cmd" class="noline">Command documentation</a></li> <li><a href="/cmd" class="noline">Command documentation</a></li>
<li><a href="/pkg" class="noline">Package documentation</a></li> <li><a href="/pkg" class="noline">Package documentation</a></li>
<li><a href="/src" class="noline">Sources</a></li>
<li class="blank">&nbsp;</li> <li class="blank">&nbsp;</li>
<li class="navhead">Go code search</li> <li class="navhead">Go code search</li>

View File

@ -552,9 +552,9 @@ func readTemplate(name string) *template.Template {
var ( var (
dirsHtml, dirListHtml,
dirsHtml,
godocHtml, godocHtml,
listingHtml,
packageHtml, packageHtml,
packageText, packageText,
parseerrorHtml, parseerrorHtml,
@ -565,9 +565,9 @@ var (
func readTemplates() { func readTemplates() {
// have to delay until after flags processing, // have to delay until after flags processing,
// so that main has chdir'ed to goroot. // so that main has chdir'ed to goroot.
dirListHtml = readTemplate("dirList.html");
dirsHtml = readTemplate("dirs.html"); dirsHtml = readTemplate("dirs.html");
godocHtml = readTemplate("godoc.html"); godocHtml = readTemplate("godoc.html");
listingHtml = readTemplate("listing.html");
packageHtml = readTemplate("package.html"); packageHtml = readTemplate("package.html");
packageText = readTemplate("package.txt"); packageText = readTemplate("package.txt");
parseerrorHtml = readTemplate("parseerror.html"); parseerrorHtml = readTemplate("parseerror.html");
@ -697,8 +697,8 @@ func serveDirectory(c *http.Conn, r *http.Request) {
} }
var buf bytes.Buffer; var buf bytes.Buffer;
if err := listingHtml.Execute(list, &buf); err != nil { if err := dirListHtml.Execute(list, &buf); err != nil {
log.Stderrf("listingHtml.Execute: %s", err); log.Stderrf("dirListHtml.Execute: %s", err);
} }
servePage(c, "Directory " + path, "", buf.Bytes()); servePage(c, "Directory " + path, "", buf.Bytes());