]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: update appinit.go, apply !appengine build constrain to main.go
authorShenghou Ma <minux.ma@gmail.com>
Tue, 3 Apr 2012 16:00:26 +0000 (00:00 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Tue, 3 Apr 2012 16:00:26 +0000 (00:00 +0800)
R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/5969063

src/cmd/godoc/appinit.go
src/cmd/godoc/main.go

index 70da001100ad832ea948aae73269d7d9d74683d8..a4ae40bf29711e4af3c12f100330d28637607a1a 100644 (file)
@@ -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() {
index cb6e0530b92ffb2e8739769332d4dca7578d6a81..3efa349b5178b08f29b59e9f393638d3abfe7533 100644 (file)
@@ -23,6 +23,8 @@
 //     godoc crypto/block Cipher NewCMAC
 //             - prints doc for Cipher and NewCMAC in package crypto/block
 
+// +build !appengine
+
 package main
 
 import (