From 96da953d86130b1d9779538c2a09d3b58e69c0f1 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Wed, 4 Apr 2012 00:00:26 +0800 Subject: [PATCH] godoc: update appinit.go, apply !appengine build constrain to main.go R=adg, dsymonds CC=golang-dev https://golang.org/cl/5969063 --- src/cmd/godoc/appinit.go | 7 +++++-- src/cmd/godoc/main.go | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cmd/godoc/appinit.go b/src/cmd/godoc/appinit.go index 70da001100..a4ae40bf29 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() { diff --git a/src/cmd/godoc/main.go b/src/cmd/godoc/main.go index cb6e0530b9..3efa349b51 100644 --- a/src/cmd/godoc/main.go +++ b/src/cmd/godoc/main.go @@ -23,6 +23,8 @@ // godoc crypto/block Cipher NewCMAC // - prints doc for Cipher and NewCMAC in package crypto/block +// +build !appengine + package main import (