Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 09-Jul-2019 | - | ||||
analysis/ | H | 09-Jul-2019 | - | 1,734 | 1,174 | |
golangorgenv/ | H | 09-Jul-2019 | - | 43 | 27 | |
redirect/ | H | 09-Jul-2019 | - | 1,672 | 1,503 | |
static/ | H | 03-May-2022 | - | 1,278 | 1,083 | |
util/ | H | 09-Jul-2019 | - | 180 | 100 | |
vfs/ | H | 09-Jul-2019 | - | 1,754 | 1,244 | |
README.md | H A D | 09-Jul-2019 | 1.1 KiB | 32 | 21 | |
corpus.go | H A D | 09-Jul-2019 | 5 KiB | 169 | 75 | |
dirtrees.go | H A D | 09-Jul-2019 | 10.1 KiB | 384 | 280 | |
dirtrees_test.go | H A D | 09-Jul-2019 | 1.5 KiB | 65 | 48 | |
format.go | H A D | 09-Jul-2019 | 10.5 KiB | 372 | 227 | |
godoc.go | H A D | 09-Jul-2019 | 25.8 KiB | 942 | 681 | |
godoc17_test.go | H A D | 09-Jul-2019 | 956 | 36 | 20 | |
godoc_test.go | H A D | 09-Jul-2019 | 9.5 KiB | 371 | 315 | |
index.go | H A D | 09-Jul-2019 | 42.2 KiB | 1,581 | 1,135 | |
index_test.go | H A D | 09-Jul-2019 | 7.4 KiB | 324 | 287 | |
linkify.go | H A D | 09-Jul-2019 | 5.8 KiB | 196 | 132 | |
meta.go | H A D | 09-Jul-2019 | 3.5 KiB | 145 | 106 | |
page.go | H A D | 09-Jul-2019 | 2 KiB | 83 | 67 | |
parser.go | H A D | 09-Jul-2019 | 2 KiB | 75 | 47 | |
pres.go | H A D | 09-Jul-2019 | 4.7 KiB | 163 | 99 | |
search.go | H A D | 09-Jul-2019 | 5.3 KiB | 187 | 131 | |
server.go | H A D | 09-Jul-2019 | 24.1 KiB | 838 | 619 | |
server_test.go | H A D | 09-Jul-2019 | 1.9 KiB | 70 | 49 | |
snippet.go | H A D | 09-Jul-2019 | 3.2 KiB | 124 | 88 | |
spec.go | H A D | 09-Jul-2019 | 3.5 KiB | 180 | 136 | |
spec_test.go | H A D | 09-Jul-2019 | 475 | 23 | 15 | |
spot.go | H A D | 09-Jul-2019 | 1.9 KiB | 84 | 47 | |
tab.go | H A D | 09-Jul-2019 | 1.6 KiB | 83 | 68 | |
template.go | H A D | 09-Jul-2019 | 5.5 KiB | 180 | 119 | |
versions.go | H A D | 09-Jul-2019 | 6.2 KiB | 225 | 172 | |
versions_test.go | H A D | 09-Jul-2019 | 3.1 KiB | 133 | 114 |
README.md
1# godoc 2 3This directory contains most of the code for running a godoc server. The 4executable lives at golang.org/x/tools/cmd/godoc. 5 6## Development mode 7 8In production, CSS/JS/template assets need to be compiled into the godoc 9binary. It can be tedious to recompile assets every time, but you can pass a 10flag to load CSS/JS/templates from disk every time a page loads: 11 12``` 13godoc -templates=$GOPATH/src/golang.org/x/tools/godoc/static -http=:6060 14``` 15 16## Recompiling static assets 17 18The files that live at `static/style.css`, `static/jquery.js` and so on are not 19present in the final binary. They are placed into `static/static.go` by running 20`go generate`. So to compile a change and test it in your browser: 21 221) Make changes to e.g. `static/style.css`. 23 242) Run `go generate golang.org/x/tools/godoc/static` so `static/static.go` picks 25up the change. 26 273) Run `go install golang.org/x/tools/cmd/godoc` so the compiled `godoc` binary 28picks up the change. 29 304) Run `godoc -http=:6060` and view your changes in the browser. You may need 31to disable your browser's cache to avoid reloading a stale file. 32