Find file History
dmitshur godoc/dl: don't display unstable releases under archive
If a release is unstable, don't consider adding it to archive or stable
lists as well. It should be present in the unstable list only.

Create and use test helper list to make tests more compact and thorough.

Also use a more consistent order of got, want in TestFilesToReleases.

Fixes golang/go#29669

Change-Id: I74cf1fa8ebf05b13a3a4c40b53442c50e0427302
Reviewed-on: https://go-review.googlesource.com/c/157499
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Latest commit 4b7be70 Jan 10, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
analysis all: fix typos in comments Aug 10, 2018
dl godoc/dl: don't display unstable releases under archive Jan 11, 2019
env godoc: migrate to App Engine flexible Oct 2, 2018
proxy godoc/proxy: remove use of httputil.ReverseProxy for /share Dec 12, 2018
redirect godoc/redirect: display Gerrit/Rietveld CL disambiguation page when n… Jan 10, 2019
short godoc: replace x/net/context with context Oct 23, 2018
static godoc/static: update copyright year in static.go Jan 2, 2019
util tools: add import comments. Dec 9, 2014
vfs godoc/vfs/zipfs: join paths to get correct RootType Sep 28, 2018
README.md godoc: add GoogleCN property to pages Aug 2, 2017
corpus.go godoc: show version information for stdlib Jul 17, 2018
dirtrees.go godoc/vfs: improve implementation of RootType Apr 11, 2018
dirtrees_test.go godoc: add benchmark for directory scan Apr 15, 2018
format.go go.tools/godoc: Fix jump-to-line in source view. Aug 1, 2013
godoc.go godoc: generate TOC from server-side for search page Oct 19, 2018
godoc17_test.go x/tools/cmd/godoc: fix broken links in composite literals Feb 17, 2017
godoc_test.go godoc: skip build tag annotations when displaying examples Jul 31, 2018
index.go all: fix typos in comments Aug 10, 2018
index_test.go x/tools/godoc: gofmt -s -w Feb 15, 2017
linkify.go godoc: use "IsPredeclared" of go/doc Nov 15, 2017
meta.go go.tools: use golang.org/x/... import paths Nov 9, 2014
page.go godoc: inject treeview content only when needed Oct 11, 2018
parser.go go.tools: use golang.org/x/... import paths Nov 9, 2014
pres.go godoc, cmd/godoc: remove CLI support Oct 11, 2018
search.go godoc: generate TOC from server-side for search page Oct 19, 2018
server.go cmd/godoc: cleanup documentation for CLI mode Oct 18, 2018
server_test.go godoc: fix counting of package files in GetPageInfo Apr 16, 2018
snippet.go godoc: add version info for struct fields Jul 17, 2018
spec.go godoc: accept scanner.RawString too during EBNF parsing Jun 25, 2018
spec_test.go godoc: accept scanner.RawString too during EBNF parsing Jun 25, 2018
spot.go godoc: add search results that point to documentation instead of source. Nov 21, 2013
tab.go godoc: add missing copyright Apr 27, 2015
template.go godoc: fix test failure Jun 13, 2018
versions.go godoc: correctly parse packages with digits in the package name Jul 22, 2018
versions_test.go godoc: fix tests on Go 1.9 Jul 25, 2018

README.md

godoc

This directory contains most of the code for running a godoc server. The executable lives at golang.org/x/tools/cmd/godoc.

Development mode

In production, CSS/JS/template assets need to be compiled into the godoc binary. It can be tedious to recompile assets every time, but you can pass a flag to load CSS/JS/templates from disk every time a page loads:

godoc -templates=$GOPATH/src/golang.org/x/tools/godoc/static -http=:6060

Recompiling static assets

The files that live at static/style.css, static/jquery.js and so on are not present in the final binary. They are placed into static/static.go by running go generate. So to compile a change and test it in your browser:

  1. Make changes to e.g. static/style.css.

  2. Run go generate golang.org/x/tools/godoc/static so static/static.go picks up the change.

  3. Run go install golang.org/x/tools/cmd/godoc so the compiled godoc binary picks up the change.

  4. Run godoc -http=:6060 and view your changes in the browser. You may need to disable your browser's cache to avoid reloading a stale file.