1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:18:32 -06:00
go/cmd/godoc
Brad Fitzpatrick 705bb7ffce godoc: remove the last of the global variables, unexport Server
The exported Server becomes handlerServer, and part of Presentation
now.  Presentation is also now an http.Handler with its own
internal mux (a detail, which might go away).

main.go becomes ever simpler.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/11505043
2013-07-19 10:27:53 +10:00
..
appinit.go go.tools/cmd/godoc: use go.talks playground package 2013-07-17 15:17:04 +10:00
codewalk.go godoc: more cleanup 2013-07-18 13:51:17 +10:00
doc.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
godoc_test.go cmd/godoc: Add a basic regression test. 2013-07-17 17:32:45 +10:00
main.go godoc: remove the last of the global variables, unexport Server 2013-07-19 10:27:53 +10:00
play.go godoc: move bulk of the code to the package 2013-07-17 17:09:54 +10:00
README.godoc-app go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
remotesearch.go godoc: more cleanup 2013-07-18 13:51:17 +10:00
setup-godoc-app.bash go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00

Copyright 2011 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.

godoc on appengine
------------------

Prerequisites
-------------

* Go appengine SDK
  https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go

* Go sources at tip under $GOROOT


Directory structure
-------------------

* Let $APPDIR be the directory containing the app engine files.
  (e.g., $APPDIR=$HOME/godoc-app)

* $APPDIR contains the following entries (this may change depending on
  app-engine release and version of godoc):

	app.yaml
	godoc.zip
	godoc/
	index.split.*

* The app.yaml file is set up per app engine documentation.
  For instance:

	application: godoc-app
	version: 1
	runtime: go
	api_version: go1

	handlers:
	- url: /.*
	  script: _go_app

* The godoc/ directory contains a copy of the files under $GOROOT/src/cmd/godoc
  with doc.go excluded (it belongs to pseudo-package "documentation")


Configuring and running godoc
-----------------------------

To configure godoc, run

	bash setup-godoc-app.bash

to create the godoc.zip, index.split.*, and godoc/appconfig.go files
based on $GOROOT and $APPDIR. See the script for details on usage.

To run godoc locally, using the app-engine emulator, run

	<path to google_appengine>/dev_appserver.py $APPDIR

godoc should come up at http://localhost:8080 .