README

Go website

Go Reference

This repo holds content and serving programs for the golang.org 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 admin.golang.org and google.golang.org. (They do not use the _content/ directory.)

Each command directory has its own README.md 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 https://golang.org/doc/contribute.html.

The main issue tracker for the website repository is located at https://github.com/golang/go/issues. Prefix your issue with "x/website:" in the subject line, so it is easy to find.

Documentation

Overview

Package website exports the static content as an embed.FS.

Index

Constants

This section is empty.

Variables

View Source
var Content = findContent()

Content is the website's static content.

Functions

This section is empty.

Types

This section is empty.

Source Files

Directories

Path Synopsis
_content
doc/codewalk
Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
doc/play
You can edit this code! Click here and start typing.
You can edit this code! Click here and start typing.
Command blog is a web server for the Go blog that can run on App Engine or as a stand-alone HTTP server.
Command blog is a web server for the Go blog that can run on App Engine or as a stand-alone HTTP server.
_content/appengine
This server can run on App Engine.
This server can run on App Engine.
_content/h2push/server
The server command demonstrates a server with HTTP/2 Server Push support.
The server command demonstrates a server with HTTP/2 Server Push support.
cmd
admingolangorg
The admingolangorg command serves an administrative interface for owners of the golang-org Google Cloud project.
The admingolangorg command serves an administrative interface for owners of the golang-org Google Cloud project.
golangorg
Golangorg serves the golang.org web sites.
Golangorg serves the golang.org web sites.
googlegolangorg
A trivial redirector for google.golang.org.
A trivial redirector for google.golang.org.
go.dev module
cmd/versionprune
Binary versionprune prunes stale AppEngine versions for a specified service.
Binary versionprune prunes stale AppEngine versions for a specified service.
internal
api
backport/archive/zip
Package zip provides support for reading and writing ZIP archives.
Package zip provides support for reading and writing ZIP archives.
backport/fmtsort
Package fmtsort provides a general stable ordering mechanism for maps, on behalf of the fmt and text/template packages.
Package fmtsort provides a general stable ordering mechanism for maps, on behalf of the fmt and text/template packages.
backport/html/template
Package template (html/template) implements data-driven templates for generating HTML output safe against code injection.
Package template (html/template) implements data-driven templates for generating HTML output safe against code injection.
backport/io/fs
Package fs defines basic interfaces to a file system.
Package fs defines basic interfaces to a file system.
backport/obscuretestdata
Package obscuretestdata contains functionality used by tests to more easily work with testdata that must be obscured primarily due to golang.org/issue/34986.
Package obscuretestdata contains functionality used by tests to more easily work with testdata that must be obscured primarily due to golang.org/issue/34986.
backport/path
Package path implements utility routines for manipulating slash-separated paths.
Package path implements utility routines for manipulating slash-separated paths.
backport/testing/fstest
Package fstest implements support for testing implementations and users of file systems.
Package fstest implements support for testing implementations and users of file systems.
backport/testing/iotest
Package iotest implements Readers and Writers useful mainly for testing.
Package iotest implements Readers and Writers useful mainly for testing.
backport/text/template
Package template implements data-driven templates for generating textual output.
Package template implements data-driven templates for generating textual output.
backport/text/template/parse
Package parse builds parse trees for templates as defined by text/template and html/template.
Package parse builds parse trees for templates as defined by text/template and html/template.
dl
Package dl implements a simple downloads frontend server.
Package dl implements a simple downloads frontend server.
env
Package env provides environment information for the golangorg server running on golang.org.
Package env provides environment information for the golangorg server running on golang.org.
history
Package history holds the Go project release history.
Package history holds the Go project release history.
memcache
Package memcache provides a minimally compatible interface for google.golang.org/appengine/memcache and stores the data in Redis (e.g., via Cloud Memorystore).
Package memcache provides a minimally compatible interface for google.golang.org/appengine/memcache and stores the data in Redis (e.g., via Cloud Memorystore).
proxy
Package proxy proxies requests to the playground's compile and share handlers.
Package proxy proxies requests to the playground's compile and share handlers.
redirect
Package redirect provides hooks to register HTTP handlers that redirect old godoc paths to their new equivalents and assist in accessing the issue tracker, wiki, code review system, etc.
Package redirect provides hooks to register HTTP handlers that redirect old godoc paths to their new equivalents and assist in accessing the issue tracker, wiki, code review system, etc.
short
Package short implements a simple URL shortener, serving shortened urls from /s/key.
Package short implements a simple URL shortener, serving shortened urls from /s/key.
spec
Package spec implements hyperlinking of the Go language specification.
Package spec implements hyperlinking of the Go language specification.
texthtml
Package texthtml formats text files to HTML.
Package texthtml formats text files to HTML.
web
webtest
Package webtest implements script-based testing for web servers.
Package webtest implements script-based testing for web servers.