Граф коммитов

1707 Коммитов

Автор SHA1 Сообщение Дата
Russ Cox 42b41e29af cmd/golangorg: serve tip.golang.org directly from Gerrit
This CL enables the code, committed in an earlier CL,
that serves tip.golang.org from an in-memory copy of the
Go repo, updated by a background loop, which will let us
retire the more heavyweight "deploy a whole new app in a loop"
that we currently use for tip.golang.org.

When this CL is committed, the "deploy a whole new app in a loop"
logic will deploy this new code, which will then start using the
in-memory copy, even though it is also being updated on each
change. At that point it will be safe to take down the app-updating
loop entirely, letting the default app do the serving.

Change-Id: Ica5cffd684c45d4a5b059772700a0a608f832bad
Reviewed-on: https://go-review.googlesource.com/c/website/+/335049
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-08-12 13:25:59 +00:00
Russ Cox f4281e3dec cmd/golangorg: add ability to serve tip.golang.org directly from Gerrit
Currently, tip.golang.org is deployed by a background loop
that fetches the latest Go and website repos every few minutes
and then does a deploy to a whole separate app.
Because this setup is different from the main app deploy,
it often gets broken by changes in the way the main app runs.

This CL removes the recurring source of breakage by making
the main app capable of serving tip.golang.org directly.
It does this by watching the main Go repo itself and downloading
a new copy of the file tree whenever there are changes.

The website repo is not watched: new changes to the website
repo already result in redeploys of the entire app when appropriate.

This CL does not actually enable the new tip.golang.org code.
A followup CL will do that, for easier rollback.

Change-Id: I015368c614579c90fa72a6699f6ab76202f87e7e
Reviewed-on: https://go-review.googlesource.com/c/website/+/328214
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-08-12 13:25:58 +00:00
Russ Cox f524297668 internal/gitfs: add git-backed FS implementation
This code is new and not anywhere else at the moment.
It is for a new implementation of tip.golang.org.

Change-Id: I176630816587387c08cdc53993889a5009612565
Reviewed-on: https://go-review.googlesource.com/c/website/+/328213
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-08-12 13:25:57 +00:00
Bryan C. Mills 06ce489bed _content/ref/mod: update terminology for Go 1.17 changes
For golang/go#47397

Change-Id: I7046bddb17bdd7957603e16580e7c9bab4a8c05a
Reviewed-on: https://go-review.googlesource.com/c/website/+/339991
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-08-06 20:43:34 +00:00
Jay Conrod 0c3ebd1d7c _content/ref/mod: document special case for LICENSE
Change-Id: Ie15dc10304d430d1fb3201931fc5c161581f79ea
Reviewed-on: https://go-review.googlesource.com/c/website/+/340209
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-08-05 20:30:57 +00:00
Alexander Rakoczy 8bf2ffb05d blog, tour, go.dev, golang.org: stop referencing mirror.gcr.io URLs
As per the documentation: Google Cloud services such as Cloud Build and
Google Kubernetes Engine automatically check for cached images before
attempting to pull an image from Docker Hub.

Also: Only obtain cached images on mirror.gcr.io by configuring the
Docker daemon. A request to pull directly from mirror.gcr.io will fail
if a cached copy of the image does not exist.

Source: https://cloud.google.com/container-registry/docs/pulling-cached-images

Change-Id: I4320f97b016d928ea7431c56dd7486467f436a53
Reviewed-on: https://go-review.googlesource.com/c/website/+/340171
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Website-Publish: DO NOT USE <dmitshur@google.com>
2021-08-05 17:43:24 +00:00
Alexander Rakoczy fb30ab730d internal/history: document Go 1.16.7 and Go 1.15.15
Change-Id: I7650239269944f3f48876cb57174ed9ffc63c1d1
Reviewed-on: https://go-review.googlesource.com/c/website/+/340169
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Website-Publish: DO NOT USE <dmitshur@google.com>
2021-08-05 17:00:27 +00:00
Jay Conrod 55fae94f8c _content/ref/mod: explain what 'go install' does for non-main packages
Change-Id: Ic4cf4566172af543cf58abc6c701a0c24f1866fe
Reviewed-on: https://go-review.googlesource.com/c/website/+/338349
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-07-29 20:27:07 +00:00
Jamal Carvalho 6ee2983001 _templates,testdata: remove package search from header
The updated designs for go.dev no longer contain package
search. Removing search from the header ahead of time to
simplify the process of making changes to search on
pkg.go.dev.

Change-Id: I49ee684641f7e80408a339ada28fe2727d549a91
Reviewed-on: https://go-review.googlesource.com/c/website/+/336909
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-07-26 14:17:44 +00:00
Pavel Watson 8b4651d061 x/website: correct a small grammatical error at effective_go page
Change-Id: Ia58d129bb7d71adad62d77a8347392ea11d8c9e0
GitHub-Last-Rev: f085d01633
GitHub-Pull-Request: golang/website#75
Reviewed-on: https://go-review.googlesource.com/c/website/+/336869
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Rob Pike <r@golang.org>
2021-07-25 17:16:03 +00:00
Russ Cox 39c67f0653 internal/pkgdoc: take on doc-specific parts of internal/web
Not all the package docs-specific parts of the server moved into
internal/pkgdoc before. Finish the job. Now the API for pkgdoc
is like the API for codewalk: just a NewServer that returns a handler.

Speaking of codewalk, unexport the Server type to match the
trimmed-down pkgdoc.

Change-Id: I19ba7351d55fb5d23d551a0296bb89d8abac6e9b
Reviewed-on: https://go-review.googlesource.com/c/website/+/328212
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-07-23 19:28:56 +00:00
Jamal Carvalho 3993074e00 go.dev/_content: focus search input shortcut key
This reverts CL 335969.

Reason for revert: broken tests fixed.

Fixes golang/go#42704.

Change-Id: Ie7090d256b2d93fb222659f5c5494a3589c48e59
Reviewed-on: https://go-review.googlesource.com/c/website/+/336250
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-07-22 14:08:59 +00:00
Jay Conrod 30a2d981b9 _content/doc/modules: add retract directive to go.mod reference
Change-Id: Ib2316795409776a9db2dd6293b76d7c0003ba7f4
Reviewed-on: https://go-review.googlesource.com/c/website/+/335690
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Traut <straut@google.com>
2021-07-21 18:16:11 +00:00
Julie Qiu b72b96fa76 Revert "go.dev/_content: focus search input shortcut key"
This reverts CL 335669.

Reason for revert: broke tests.

Fixes golang/go#47294.

Change-Id: I55d156aa79b1f4c41a813e9087318d67079c862c
Reviewed-on: https://go-review.googlesource.com/c/website/+/335969
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-07-20 15:00:41 +00:00
Carson Hoffman 7b37f32c8b internal/web: stop double-escaping of code in non-playground examples
CL 317655 introduced an issue causing non-playground code examples
to be double-escaped, causing HTML escape sequences and elements
to appear in the code, such as the examples in crypto/rsa,
as reported in golang/go#46839. This change treats the code as
template.HTML rather than string after running through (*Page).Node
(which formats the code as HTML) and doing some basic transformations,
preventing this double-escaping from occurring.

Fixes golang/go#46839

Change-Id: Id226147eb51219bd5e2db61e959519258e39a298
GitHub-Last-Rev: 81f8dc5e87
GitHub-Pull-Request: golang/website#73
Reviewed-on: https://go-review.googlesource.com/c/website/+/332889
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
2021-07-19 21:36:17 +00:00
Bryan C. Mills 183dc663dd _content/doc/modules/gomod-ref: add links to /ref/mod
Also update the list of behaviors controlled by the go directive for
Go 1.17.

Change-Id: Ie9eee13f0c43efd41f97d8d7c30a5ec354064776
Reviewed-on: https://go-review.googlesource.com/c/website/+/335141
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Traut <straut@google.com>
2021-07-19 20:26:38 +00:00
Jamal Carvalho 661e745926 go.dev: remove broken share a case study link
Fixes golang/go#46559

Change-Id: I7e98e51c07c3485665a6e74270c4614f761b5244
Reviewed-on: https://go-review.googlesource.com/c/website/+/335649
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
2021-07-19 19:19:28 +00:00
Jamal Carvalho a12317d02d go.dev/_content: focus search input shortcut key
On non-firefox browsers the search input is focussed
after pressing the / key to match the behavior of
pkg.go.dev.

Fixes golang/go#42704

Change-Id: I81a804a9062f78997f3161ec86d1adcb8a911c92
Reviewed-on: https://go-review.googlesource.com/c/website/+/335669
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
2021-07-19 19:19:10 +00:00
Dmitri Shuralyov ea8c25a269 tour: look for content in x/website module
As of CL 323897, the tour command and its static content are
contained in a module with a slightly different module path.
Update findRoot accordingly so it looks in the right place.

Updates golang/go#44243.

Change-Id: I5c979789440464ca3f9f99799bcc8e73db0769a3
Reviewed-on: https://go-review.googlesource.com/c/website/+/334969
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-07-17 18:43:54 +00:00
Alberto Donizetti 02958007db tour: fix instructions to run locally
Since the golang/tour repository was emptied and the tour content
moved to x/website/tour, go-getting golang.org/x/tour no longer works.
This change updates the instructions to run the tour locally, both in
the tour welcome page and in the repository's README.

It also updates the pkg.go.dev badge link.

Fixes golang/tour#1203

Change-Id: I1591e790ff3821dea4304f38a7ebc7867da585a6
Reviewed-on: https://go-review.googlesource.com/c/website/+/326330
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-07-17 16:35:42 +00:00
Bryan C. Mills 7588ddd3e9 _content/ref/mod: mention other Go 1.17 behaviors that depend on the go version
Updates golang/go#36876
Updates golang/go#42970
Updates golang/go#45965

Change-Id: I542e9ece986806f9b4a062f242387b1ca47f5814
Reviewed-on: https://go-review.googlesource.com/c/website/+/335050
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-07-16 21:09:52 +00:00
Bryan C. Mills fa093afd72 _content/ref/mod: document Go 1.17 lazy loading and module graph pruning
For golang/go#36460

Change-Id: I36b3657103f069412b225356d011a19c1a10109e
Reviewed-on: https://go-review.googlesource.com/c/website/+/333629
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-07-16 21:09:22 +00:00
Frederik Zipp 11adafea15 _content/doc: remove duplicated "does not"
Change-Id: I8930b2e394c30334b99bb3e169e805f2025ec7d9
Reviewed-on: https://go-review.googlesource.com/c/website/+/324709
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
2021-07-15 15:49:25 +00:00
Bryan C. Mills 3cb80103cf _content/doc/modules/pruning: add a placeholder redirecting to “Managing dependencies”
I plan to add a more in-depth troubleshooting guide at this URL.
For now, I just need to URL to work so that I can point to it in
the 'go' command in Go 1.17 (in CL 332573).

For golang/go#36460

Change-Id: I95f03f76519dfb196ed6c9c13003b2ad9becf6c9
Reviewed-on: https://go-review.googlesource.com/c/website/+/334389
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Traut <straut@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-07-13 21:58:40 +00:00
Dmitri Shuralyov 8557135a89 internal/history: document Go 1.16.6 and Go 1.15.14
Change-Id: I2a585536147bd030f1bb333c05ffa45ef656bfcc
Reviewed-on: https://go-review.googlesource.com/c/website/+/334069
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2021-07-12 22:28:50 +00:00
Russ Cox 29745a29f8 cmd/golangorg: fix, restore tip.golang.org tests
The golang.org health check was failing the tip.golang.org tests
because the host enforcer was redirecting an unknown subdomain
to golang.org. Make tip a known subdomain to fix the tests, and
then restore them.

(The standard tip.golang.org setup disables the enforcer instead.)

Change-Id: Id15e7bcb3a704b7782e132c4303576f9d3e80cb0
Reviewed-on: https://go-review.googlesource.com/c/website/+/334112
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-07-12 20:02:05 +00:00
Russ Cox e8cce616b8 cmd/golangorg: fix test case for tip
The tip code hasn't landed yet, this snuck in early.

Change-Id: I6ca1dcd5cca403456dc8e13e5a2821b553619f50
Reviewed-on: https://go-review.googlesource.com/c/website/+/334110
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-07-12 19:14:20 +00:00
Russ Cox aa5eb5fcb4 internal/web: redirect golang.org/pkg/... to pkg.go.dev/...
This reduces the number of documentation sites we have to one.
Except in China, where we have to keep serving on the one domain
golang.google.cn - there is no pkg.go.dev in China.
And unless people opt out with ?m=old.

For golang/go#44356.

Change-Id: I2a5b788ac861ce37f356287413468497d184fc09
Reviewed-on: https://go-review.googlesource.com/c/website/+/327849
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-07-12 19:03:25 +00:00
Steve Traut f481c2bd18 _content/doc: fix a broken link to Querying topic
This change fixes a link from /doc/database/change-data
to /doc/database/querying.

Change-Id: I76b57d0df17b4ef65dc02afd0a1f33aeef262243
Reviewed-on: https://go-review.googlesource.com/c/website/+/332251
Reviewed-by: Russ Cox <rsc@golang.org>
Trust: Steve Traut <straut@google.com>
2021-07-12 15:12:58 +00:00
Steve Traut a46b181d9b _content/doc: add a Go/Gin web service tutorial
This adds a tutorial introducing how to build a RESTful web service
using Go and the Gin web framework.

This change includes:

- A RESTful web service tutorial:
  - _content/doc/tutorial/web-service-gin.md

- Updates to index topics so that they list the new content.
  - _content/doc/index.html
  - _content/doc/tutorial/index.html

Change-Id: I137dcd884c4e38b4a2bebd733ec630f2d9bc3b95
Reviewed-on: https://go-review.googlesource.com/c/website/+/332349
Trust: Steve Traut <straut@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2021-07-12 15:00:05 +00:00
Jay Conrod aee54c06b6 _content/ref: add table of supported version control systems
Change-Id: Id83f3e7deac143abb1db7272090daafad89acab9
Reviewed-on: https://go-review.googlesource.com/c/website/+/324489
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-07-08 21:22:47 +00:00
Steve Traut d6de7f00de _content/doc: add data access tutorial and guide
This adds an introductory tutorial on accessing relational
databases, as well as a deeper dive data access guide
comprising nine topics.

This change includes:

- A data access tutorial:
  - _content/doc/tutorial/database-access.md -- An introductory
    data access tutorial.

- A data access guide:
  - _content/doc/database/index.md -- An overview of data
    access with Go.
  - _content/doc/database/open-handle -- On opening a database handle.
  - _content/doc/database/change-data -- On executing SQL statements
    that don't return data
  - _content/doc/database/querying -- On querying for data
  - _content/doc/database/prepared-statements -- On using prepared
    statements
  - _content/doc/database/execute-transactions -- On executing
    transactions
  - _content/doc/database/cancel-operations -- On using Context to
    support cancelling in-progress database operations
  - _content/doc/database/manage-connections -- On customizing the
    connection pool and using a reserved connection
  - _content/doc/database/sql-injection -- On using function
    parameters to avoid a SQL injection risk

- Updates to index topics so that they list the new content.
  - _content/doc/index.html
  - _content/doc/tutorial/index.html

Change-Id: Iab94d93e5d53e1379b22098c08d517b99cfa2c27
Reviewed-on: https://go-review.googlesource.com/c/website/+/331449
Reviewed-by: Russ Cox <rsc@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Steve Traut <straut@google.com>
2021-07-01 14:24:37 +00:00
Than McIntosh 6a50fde3fa internal/dl: add thanm to validUser
Change-Id: Ic87f3bf158b573a9773e999d79860fba58f2a92c
Reviewed-on: https://go-review.googlesource.com/c/website/+/332069
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-07-01 13:29:39 +00:00
Bryan C. Mills 63a720e45b _content/ref/mod: clarify that go.mod files are not required for dependencies
We already mentioned this fact elsewhere in the document, but the
"go.mod files" section is a likely starting point for someone trying
to figure out what happens when the file is missing. This adds some
prose and links there to point the reader to the appropriate sections.

Noticed via https://stackoverflow.com/q/67030123.

Change-Id: Ia7fe50a8b97b8cc1320778c318e5b3b0694d7c05
Reviewed-on: https://go-review.googlesource.com/c/website/+/331949
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-06-30 18:47:03 +00:00
Bryan C. Mills f5efdd8478 _content/doc/modules: add missing space in link text
Change-Id: Iecd4a489c730563abf13dcf5990e8361a89d4edd
Reviewed-on: https://go-review.googlesource.com/c/website/+/331549
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-06-30 15:08:38 +00:00
Russ Cox a430a3f526 internal/web: pre-expand tabs in markdown
Goldmark has a bug that causes crashes in inputs
containing mixed spaces and tabs. Avoid it by removing tabs.

Change-Id: I4c678fce6c68bf0d448ed0b75a2ac12a42891ec6
Reviewed-on: https://go-review.googlesource.com/c/website/+/331349
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Traut <straut@google.com>
2021-06-28 13:50:53 +00:00
Russ Cox f5f2b7d2bc blog/stackoverflow: add Go Collective link earlier
Change-Id: I7124a778631f24f50a9472db43684d09ffa3508c
Reviewed-on: https://go-review.googlesource.com/c/website/+/330730
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Francia <spf@golang.org>
2021-06-24 20:48:17 +00:00
Russ Cox 2c48e862e9 go.dev: add five new blog posts to solutions page
- Allegro
- Monzo
- SIXT
- Stream
- Trivago

Change-Id: Ife0ea0051cf9ed0357175fb21ed18b96cda918d8
Reviewed-on: https://go-review.googlesource.com/c/website/+/330729
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Francia <spf@golang.org>
2021-06-24 20:48:15 +00:00
Russ Cox 5d3d845a1c blog/_content: add stackoverflow.article
Change-Id: I0b0e4478cb111bd8b3828707eb82cd488a2bf8be
Reviewed-on: https://go-review.googlesource.com/c/website/+/330449
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Francia <spf@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-06-23 20:17:50 +00:00
Russ Cox 5f5f230b60 all: promote new app deployments only after they become ready
There are differences in the App Engine environment that
cannot be adequately simulated elsewhere. Although we do
the best we can with testing locally, there will always be
differences.

The old makefiles deployed the site, then ran a regression
test against it, and then promoted the tested version.

This change does the same. The testing has moved into the
web server proper so that it can test the handler directly and
thereby check things like the responses on different domains.

The go-app-deploy.sh now always deploys --no-promote,
only promoting after a self-test passes on the deployed site.

Unlike the old check which only applied to golang.org,
the new pre-promotion testing happens for all the sites.

Also factor out GoogleCN into internal/web, because we needed
to modify it (to avoid internal/webtest's requests being diagnosed
as coming from China) and there were too many copies.

Change-Id: I0cde0e2167df2332939908e716ddb6bf429f2565
Reviewed-on: https://go-review.googlesource.com/c/website/+/329250
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-23 19:06:38 +00:00
Russ Cox d38c22d04f cmd/golangorg: expose multiple domains on testing servers
We already have one server handling multiple domains:
golang.org and golang.google.cn. As we make the server
handle more domains it is helpful to be able to get at each
of them in the testing server.

This CL changes the behavior on localhost or on an appspot.com domain
to pull the effective host name out of the first element of the path.
It also rewrites HTML responses to turn relative links like /doc to /<host>/doc
and to turn absolute links like https://golang.org/doc into /golang.org/doc.

Change-Id: I032b626f1c75deed61a9ae2d9562d6b177b2824a
Reviewed-on: https://go-review.googlesource.com/c/website/+/328013
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-23 18:38:55 +00:00
Heschi Kreinick d52a65716c _content/doc: fix go mod edit for PowerShell
"-replace=foo.com=bar.com" triggers this bug in PowerShell:
https://github.com/PowerShell/PowerShell/issues/6291
The go command accepts "-replace foo.com=bar.com" just fine. Use that
instead.

Fixes #44924.

Change-Id: I854ea86282db425a2707c641b0500208b4869870
Reviewed-on: https://go-review.googlesource.com/c/website/+/330229
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Traut <straut@google.com>
2021-06-23 15:10:42 +00:00
Tobias Klauser 050e222eac _content/doc/modules: add missing @ in replace command
Change-Id: I96f1559e42a46eba327795d953b45eebd034af0e
Reviewed-on: https://go-review.googlesource.com/c/website/+/330049
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-06-22 16:20:43 +00:00
Jay Conrod 08e38f9b82 _content/ref: add extra note for 'go get' build deprecation
For golang/go#43684

Change-Id: Ic72fd0b6d1f4ff3262115e1cdaf028c315dc18f8
Reviewed-on: https://go-review.googlesource.com/c/website/+/329500
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-06-21 15:36:43 +00:00
Eno Compton 166cd2c7a7 blog: fix broken link
Change-Id: Ia4e81679eb988c6c10f754e6eac9a5ad7b5ada74
Reviewed-on: https://go-review.googlesource.com/c/website/+/329496
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Tyler Bui-Palsulich <tbp@google.com>
2021-06-21 15:25:17 +00:00
Russ Cox 06fdb770f7 cmd/golangorg: make zip contents seekable
https://golang.org/misc/cgo/stdio/testdata/fib.go fails right now
because the http.FileServer wants to use Seek to find out the file size.
Make that work by introducing an FS wrapper that enables seeking
in an in-memory copy of the file content.

Fixes golang/go#46809.

Change-Id: I353905310dc74594e54e0181dc821a97992b8da7
Reviewed-on: https://go-review.googlesource.com/c/website/+/329249
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Russ Cox <rsc@golang.org>
2021-06-18 01:31:37 +00:00
Russ Cox a2b5f4911c cmd/golangorg: find contentDir even on App Engine
After the refactoring we use this now instead of repoRoot
in the call to NewHandler.

Once we have Go 1.16 this will all be simplified using //go:embed.

Also delete comment that I deleted locally in the previous CL
but then didn't upload before clicking Submit on the Gerrit web page.

Change-Id: Id6e122d39914c1059e97af6cd7e90049142dbe7f
Reviewed-on: https://go-review.googlesource.com/c/website/+/329010
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-18 01:30:32 +00:00
Russ Cox 30658dff6b cmd/golangorg: factor out main handler setup
Also avoid use of http.DefaultServeMux entirely, for clarity about what is registered.

Change-Id: Ibd7ccd7a6c3cb6b79e94b77570ad016a1be11f0c
Reviewed-on: https://go-review.googlesource.com/c/website/+/328012
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-17 16:55:37 +00:00
Russ Cox 7e9c28a76a cmd/golangorg: merge into single source file
There is so little left here that the file
boundaries make no sense anymore.
Move all the functions into main.go.
registerHandlers was inlined instead of
copied.

Change-Id: If91a5d1dc75834747b9d803ec44790950d503aed
Reviewed-on: https://go-review.googlesource.com/c/website/+/328011
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-17 16:18:35 +00:00
Russ Cox fdd9055814 cmd/golangorg: deduplicate testdata/live.txt and testdata/web.txt
These are duplicates for no particularly good reason anymore.
Move the general tests into testdata/web.txt, leaving in live.txt
only the tests that cannot work except in production.

Change-Id: Ia8b4271a9cce78814ac57c7b4a462383e77ee3d5
Reviewed-on: https://go-review.googlesource.com/c/website/+/328010
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-17 16:18:31 +00:00