LEFT | RIGHT |
(no file at all) | |
1 Copyright 2011 The Go Authors. All rights reserved. | 1 Copyright 2011 The Go Authors. All rights reserved. |
2 Use of this source code is governed by a BSD-style | 2 Use of this source code is governed by a BSD-style |
3 license that can be found in the LICENSE file. | 3 license that can be found in the LICENSE file. |
4 | 4 |
5 godoc on appengine | 5 godoc on appengine |
6 ------------------ | 6 ------------------ |
7 | 7 |
8 Prerequisites | 8 Prerequisites |
9 ------------- | 9 ------------- |
10 | 10 |
11 * Go appengine SDK 1.5.5 - 2011-10-11 | 11 * Go appengine SDK |
12 http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Go | 12 https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go |
13 | 13 |
14 * Go sources at tip under $GOROOT | 14 * Go sources at tip under $GOROOT |
15 | 15 |
16 | 16 |
17 Directory structure | 17 Directory structure |
18 ------------------- | 18 ------------------- |
19 | 19 |
20 * Let $APPDIR be the directory containing the app engine files. | 20 * Let $APPDIR be the directory containing the app engine files. |
21 (e.g., $APPDIR=$HOME/godoc-app) | 21 (e.g., $APPDIR=$HOME/godoc-app) |
22 | 22 |
23 * $APPDIR contains the following entries (this may change depending on | 23 * $APPDIR contains the following entries (this may change depending on |
24 app-engine release and version of godoc): | 24 app-engine release and version of godoc): |
25 | 25 |
26 alt/ | |
27 encoding/binary/ | |
28 go/* | |
29 index/suffixarray/ | |
30 app.yaml | 26 app.yaml |
31 godoc.zip | 27 godoc.zip |
32 godoc/ | 28 godoc/ |
33 index.split.* | 29 index.split.* |
34 | 30 |
35 * The app.yaml file is set up per app engine documentation. | 31 * The app.yaml file is set up per app engine documentation. |
36 For instance: | 32 For instance: |
37 | 33 |
38 application: godoc-app | 34 application: godoc-app |
39 » version: 1-5-5 | 35 » version: 1 |
40 runtime: go | 36 runtime: go |
41 » api_version: 3 | 37 » api_version: go1 |
42 | 38 |
43 handlers: | 39 handlers: |
44 - url: /.* | 40 - url: /.* |
45 script: _go_app | 41 script: _go_app |
46 | 42 |
47 * The godoc/ directory contains a copy of the files under $GOROOT/src/cmd/godoc | 43 * The godoc/ directory contains a copy of the files under $GOROOT/src/cmd/godoc |
48 with modifications: | 44 with doc.go excluded (it belongs to pseudo-package "documentation") |
49 | |
50 » - doc.go is excluded (it belongs to pseudo-package Ã’documentationÓ) | |
51 » - main.go is excluded (appinit.go is taking its place) | |
52 | |
53 Additional manual modifications are required to refer to the alt/ packages | |
54 where the app-engine library is not up-to-date with the godoc version. | |
55 | |
56 * The alt/ directory contains up-to-date copies of Go packages that a tip-based | |
57 godoc is dependent on but which do not yet exist in the current app-engine SDK
. | |
58 At the time of this writing (10/14/2011) this is the entire go directory tree | |
59 (for the missing FileSet serialization code in go/token) as well as the | |
60 index/suffixarray package (for the missing suffix array serialization code). | |
61 The latest (alt/)index/suffixarray package internally requires the latest | |
62 version of encoding/binary, which is why it also needs to be present under | |
63 alt/. | |
64 | 45 |
65 | 46 |
66 Configuring and running godoc | 47 Configuring and running godoc |
67 ----------------------------- | 48 ----------------------------- |
68 | 49 |
69 To configure godoc, run | 50 To configure godoc, run |
70 | 51 |
71 bash setup-godoc-app.bash | 52 bash setup-godoc-app.bash |
72 | 53 |
73 to create the godoc.zip, index.split.*, and godoc/appconfig.go files | 54 to create the godoc.zip, index.split.*, and godoc/appconfig.go files |
74 based on $GOROOT and $APPDIR. See the script for details on usage. | 55 based on $GOROOT and $APPDIR. See the script for details on usage. |
75 | 56 |
76 To run godoc locally, using the app-engine emulator, run | 57 To run godoc locally, using the app-engine emulator, run |
77 | 58 |
78 <path to google_appengine>/dev_appserver.py $APPDIR | 59 <path to google_appengine>/dev_appserver.py $APPDIR |
79 | 60 |
80 godoc should come up at http://localhost:8080 . | 61 godoc should come up at http://localhost:8080 . |
LEFT | RIGHT |