1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:24:50 -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><a href="/cmd" class="noline">Command 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="navhead">Go code search</li>

View File

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