mirror of
https://github.com/golang/go
synced 2024-11-25 09:27:57 -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:
parent
171ef39949
commit
642caacfa3
@ -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"> </li>
|
<li class="blank"> </li>
|
||||||
<li class="navhead">Go code search</li>
|
<li class="navhead">Go code search</li>
|
||||||
|
@ -552,9 +552,9 @@ func readTemplate(name string) *template.Template {
|
|||||||
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
dirListHtml,
|
||||||
dirsHtml,
|
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());
|
||||||
|
Loading…
Reference in New Issue
Block a user