1
0
mirror of https://github.com/golang/go synced 2024-09-30 20:18:33 -06:00
go/cmd/godoc
Andrew Gerrand d79f4fe25b go.tools/cmd/godoc: copy godoc from core reposistory
The plan for godoc:
- Copy godoc source from the core repo to go.tools (this CL).
- Break godoc into several packages inside go.tools, leaving a package
  main that merely sets up a local file system, interprets the command
  line, and otherwise delegates the heavy-lifting to the new packages.
- Remove godoc from the core repo.
- Update cmd/go to install this godoc binary in $GOROOT/bin.
- Update misc/dist to include godoc when building binary distributions.

R=bradfitz
CC=golang-dev
https://golang.org/cl/11408043
2013-07-17 14:02:35 +10:00
..
appinit.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
codewalk.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
dirtrees.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
doc.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
filesystem.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
format.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
godoc.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
index.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
linkify.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
main.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
parser.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
play-appengine.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
play-local.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
play.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
README.godoc-app go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
setup-godoc-app.bash go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
snippet.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
spec.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
template.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
throttle.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
utils.go go.tools/cmd/godoc: copy godoc from core reposistory 2013-07-17 14:02:35 +10:00
zip.go 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 .