diff options
| author | Michael Stapelberg <stapelberg@debian.org> | 2013-03-04 21:27:36 +0100 |
|---|---|---|
| committer | Michael Stapelberg <michael@stapelberg.de> | 2013-03-04 21:27:36 +0100 |
| commit | 04b08da9af0c450d645ab7389d1467308cfc2db8 (patch) | |
| tree | db247935fa4f2f94408edc3acd5d0d4f997aa0d8 /src/cmd/godoc/appinit.go | |
| parent | 917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff) | |
| download | golang-04b08da9af0c450d645ab7389d1467308cfc2db8.tar.gz | |
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'src/cmd/godoc/appinit.go')
| -rw-r--r-- | src/cmd/godoc/appinit.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/godoc/appinit.go b/src/cmd/godoc/appinit.go index 70da00110..996b2b850 100644 --- a/src/cmd/godoc/appinit.go +++ b/src/cmd/godoc/appinit.go @@ -17,9 +17,12 @@ import ( ) func serveError(w http.ResponseWriter, r *http.Request, relpath string, err error) { - contents := applyTemplate(errorHTML, "errorHTML", err) // err may contain an absolute path! w.WriteHeader(http.StatusNotFound) - servePage(w, relpath, "File "+relpath, "", "", contents) + servePage(w, Page{ + Title: "File " + relpath, + Subtitle: relpath, + Body: applyTemplate(errorHTML, "errorHTML", err), // err may contain an absolute path! + }) } func init() { @@ -34,6 +37,7 @@ func init() { *indexFiles = indexFilenames *maxResults = 100 // reduce latency by limiting the number of fulltext search results *indexThrottle = 0.3 // in case *indexFiles is empty (and thus the indexer is run) + *showPlayground = true // read .zip file and set up file systems const zipfile = zipFilename @@ -48,6 +52,7 @@ func init() { readTemplates() initHandlers() registerPublicHandlers(http.DefaultServeMux) + registerPlaygroundHandlers(http.DefaultServeMux) // initialize default directory tree with corresponding timestamp. initFSTree() |
