Commit 642caacf authored by Robert Griesemer's avatar Robert Griesemer

- 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
parent 171ef399
......@@ -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>
......
......@@ -552,9 +552,9 @@ func readTemplate(name string) *template.Template {
var (
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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment