cmd/golangorg: simplify local vs prod programs

There was too much duplicated code between main.go
and appinit.go and too many build-tagged-out files.

Make main.go the func main for both prod and local.
Introduce local.go, merging dl.go and play.go.
Introduce prod.go, holding the prod-specific bits of appinit.go
(the rest are in main.go).

Rename the build tag to prod instead of golangorg
(the whole program is golangorg; it's very confusing).

Fixes golang/go#41102.

Change-Id: I261ce8e9171110f01798025f8218ce9f8253af81
Trust: Russ Cox <>
Reviewed-by: Dmitri Shuralyov <>
22 files changed
tree: 23c57e4a7af11901011d6577768d71ea67afd7ca
  1. .prettierrc
  8. _content/
  9. cmd/
  10. codereview.cfg
  11. content.go
  12. favicon.ico
  13. go.mod
  14. go.sum
  15. internal/
  16. robots.txt

Go website

Go Reference

This repo holds content and serving programs for the web site.

Content is in _content/. Server code is in cmd/ and internal/.

To run the server to preview local content changes, use:

go run ./cmd/golangorg

The supporting programs cmd/admingolangorg and cmd/googlegolangorg are the servers for and (They do not use the _content/ directory.)

Each command directory has its own explaining deployment.

JS/CSS Formatting

This repository uses prettier to format JS and CSS files.

The version of prettier used is 1.18.2.

It is encouraged that all JS and CSS code be run through this before submitting a change. However, it is not a strict requirement enforced by CI.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see

The main issue tracker for the website repository is located at Prefix your issue with “x/website:” in the subject line, so it is easy to find.