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

208 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov aa6fa315fa cmd/adminapp: update App Engine runtime to Go 1.20
It's newer than Go 1.19 and was convenient for me to bump.

Change-Id: I318a9178295411f519e9f89f99505528c3b5922e
Reviewed-on: https://go-review.googlesource.com/c/website/+/505835
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-06-23 21:34:14 +00:00
Russ Cox 54f78e7f44 internal/history: fix typo in release table
Change-Id: Idcce36399d22b950a982b09ee6d9ac9ada4ab21d
Reviewed-on: https://go-review.googlesource.com/c/website/+/482840
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-06-05 20:27:29 +00:00
Russ Cox 4fc81e6d7c admingolangorg: move to symbolic-datum-552 on admin.go.dev
This way nothing in the golang-org project needs IAP.
Leave behind a redirect on admin.golang.org to admin.go.dev.

Also rename app to adminapp; add new redirector adminredirect.

Change-Id: I062d92db31e39a7f58fd3aad77fc5eef64e3f0dd
Reviewed-on: https://go-review.googlesource.com/c/website/+/495275
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2023-05-16 17:51:57 +00:00
Dmitri Shuralyov 02b70d4b2e cmd/googlegolangorg: remove go-source meta tag where unnecessary
pkg.go.dev doesn't need the go-source meta tag to be set when the source
repository is hosted on GitHub; it detects that from the go-import meta
tag and does the rest itself. Only the protobuf repo still needs it:
its canonical source repository is on Gerrit but it prefers a mirror
repository on GitHub to be used for viewing the source code.

Also make the redirect message nicer, like CL 293415 did for
golang.org/x repos.

Change-Id: I489f17163fb574e0fb8edb8575af8b66ca7e5251
Reviewed-on: https://go-review.googlesource.com/c/website/+/485355
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2023-04-19 17:54:38 +00:00
Dmitri Shuralyov d4f5804395 cmd/golangorg: remove go-source meta tag for golang.org/x repos
The go-source meta tag was added in CL 2719 so that godoc.org could
link to source code for golang.org/x repos. godoc.org is now served
by golang.org/x/pkgsite rather than by github.com/golang/gddo, and
x/pkgsite maintains this mapping for golang.org/x repos itself in
x/pkgsite/internal/source. Drop the tag since it has become unused
and stale (we've since switched to https://cs.opensource.google/go
for viewing x/ repo source code).

Updates golang/go#40477.

Change-Id: Id029e58bfdb838e040241d6bf7677349cec6e04a
Reviewed-on: https://go-review.googlesource.com/c/website/+/484515
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
2023-04-19 17:23:12 +00:00
Russ Cox 0c673f0921 cmd/golangorg: add support for module form of Go distributions
Add https://golang.org/toolchain serving appropriate meta tags
with mod redirect to https://go.dev/dl/mod.

Add https://go.dev/dl/mod/golang.org/toolchain/@v/ redirecting
to files in https://dl.google.com/go/.

Add https://go.dev/dl/mod/golang.org/toolchain/@v/list listing
stable toolchain versions.

For golang/go#57001.

Change-Id: Ib3283cab1d8ead0373ca7549f0e17ccba7cfaa22
Reviewed-on: https://go-review.googlesource.com/c/website/+/480840
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-03-31 16:08:49 +00:00
Robert Findley 2bd866e379 cmd/golangorg: update testdata/live.txt to expect the VetErrors field
CL 478576 restored support for go vet errors to go.dev/play. However, I
didn't realize that cmd/golangorg/testdata contained tests that aren't
run by trybots. Since these tests were not updated, the deployment
failed.

Update live.txt to expect the VetErrors field. Tested locally by
uncommenting the skip in server_test.go.

For golang/go#58560

Change-Id: I2757ef569907a730f9cccccd0f15e7a7b1bb9975
Reviewed-on: https://go-review.googlesource.com/c/website/+/480236
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-03-29 18:05:46 +00:00
Frederick Mixell 3c15923231 _content: Why Go/Solutions routing update
- Update links: solutions#case-studies => solutions/case-studies.
- Update links: solutions#use-cases    => solutions/use-cases.
- Adds blank markdown files as place holders for these pages.
- Removes js for tabbing because it's no longer used.
- Convert solutions index page into directory page (no design).
- Add old slider to case studies page so it isn't missing from a deploy

Screenshot: https://drive.google.com/file/d/1FWC_d6SUqPZ0UQfETCyvOjcvEUCI4KGA/view?usp=sharing

Change-Id: If9e2f866c5e3252cdd943068d212f0264f01b1e5
Reviewed-on: https://go-review.googlesource.com/c/website/+/436335
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
2023-03-13 17:03:14 +00:00
Frederick Mixell 0728710903 _content: Go project page redesign
Converting project page to use the "flat card"

- divides up page into sections to match the design preserving ID's
- removes test in web.txt that looks for release schedule because it was removed.

Video: https://drive.google.com/file/d/1MYcZTeuoDAoEFTWRRVZ93hyLsJSwKi2I/view?usp=sharing

Change-Id: If3df2f050592c5c1ac3a92763404e8eaba3972be
Reviewed-on: https://go-review.googlesource.com/c/website/+/445578
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-03-09 19:40:47 +00:00
Dmitri Shuralyov b3fbc1164a cmd/golangorg: move _GO_REF value from trigger to config file
The cmd/golangorg/cloudbuild.yaml Cloud Build configuration file is
used by a single Cloud Build trigger that substitutes _GO_REF with
the current Go release branch: "release-branch.go1.20" as of Feb 1.
This value changes whenever there's a major Go release.

With the way things are set up now, it seems there's less overhead
in changing this value via a Gerrit CL than by editing the trigger,
so remove the _GO_REF layer of indirection. If something about the
Go release process or website deployment changes to make it easier
to maintain this value externally, we can change this once again.

Change-Id: Ie8ebc257031c7fd5c10f0cd91dd71093e69ba157
Reviewed-on: https://go-review.googlesource.com/c/website/+/464595
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-02-02 18:12:57 +00:00
Dmitri Shuralyov effafb5397 cmd/{admingolangorg,googlegolangorg}: update App Engine runtime to Go 1.19
Keep them up with the times.

Also rewrite googlegolangorg's .gcloudignore to more effectively include
only the bare minimum files using the same approach as in CL 406374.

Change-Id: Ibc42b164e0cfb8052af0ec560044a20c62fc8368
Reviewed-on: https://go-review.googlesource.com/c/website/+/456775
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-15 22:34:36 +00:00
Dmitri Shuralyov a697538369 internal/backport: delete
Now that the deploy happens with Go 1.19, it's viable to start using
these packages from the standard library instead of their backported
temporary copies.

Keeping Go 1.18 happy during its last two months of support requires
a tiny complication in pkgdoc package. An alternative path is to not
drop internal/backport/go/doc and all of its dependencies right away,
but getting to zero backported packages sooner was hard to resist...

For golang/go#51800.

Change-Id: Ieb7a137a033d6b6850dfc019c8c0c767756cc30d
Reviewed-on: https://go-review.googlesource.com/c/website/+/456522
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
2022-12-12 20:37:14 +00:00
Dmitri Shuralyov 21c8d588a1 cmd/golangorg: update App Engine runtime to Go 1.19
Now that it's available, start deploying with it.

For golang/go#51800.

Change-Id: I11c4dc131e33f192e9d7ea1fb5a154fc3422dece
Reviewed-on: https://go-review.googlesource.com/c/website/+/456521
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-12-12 15:40:29 +00:00
Russ Cox 5934f13cc5 _content: change Go headline on go.dev
The old one (“Build fast, reliable, and efficient software at scale”)
is missing "simple" and "secure"; also "fast" and "efficient" are synonyms.

Change-Id: I50e6bb524e5095d88b4b71f644c3653da98712ff
Reviewed-on: https://go-review.googlesource.com/c/website/+/451297
Reviewed-by: Sameer Ajmani <sameer@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
2022-11-18 18:55:21 +00:00
Heschi Kreinick cf701bc4fc cmd/admingolangorg: run under IAP and support playground removals
In locking down our permissions, I blocked access to this site and
x/build/rmplaysnippet. Put the site behind IAP, and add playground
removal support.

Change-Id: I7722f5911f31a140c93780fe0417dd2368276926
Reviewed-on: https://go-review.googlesource.com/c/website/+/435455
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Heschi Kreinick <heschi@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2022-09-27 21:05:40 +00:00
Jamal Carvalho d31a06e2b1 _content,cmd: remove events section from homepage and get started page
The upcoming changes to the navbar will feature the meetup events
page. We can remove these sections instead of rebuilding the
integration with the GraphQL API.

Fixes golang/go#54796.

Change-Id: Ic29d9031f9359714d0b90fafbaff289a1ae9c877
Reviewed-on: https://go-review.googlesource.com/c/website/+/429577
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Auto-Submit: Jamal Carvalho <jamal@golang.org>
2022-09-10 00:07:36 +00:00
Jamal Carvalho bcc99d0417 cmd/golangorg: skip event step in cloudbuild deploy
Due to changes in the meetup API this step is failing.
Skip this step while we troubleshoot so the website
deploy job will complete.

For golang/go#54796.

Change-Id: Ic71f191b71527c3862af155c2794d2af5127d46c
Reviewed-on: https://go-review.googlesource.com/c/website/+/426836
Reviewed-by: Julie Qiu <julieqiu@google.com>
Auto-Submit: Jamal Carvalho <jamal@golang.org>
Auto-Submit: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julieqiu@google.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-31 18:57:55 +00:00
Dmitri Shuralyov a6a8edf7d3 cmd/golangorg: make release.txt less brittle
CL 421426 extended release.txt coverage to include history entries for
the latest releases, including the currently supported Go 1.19 and 1.18.
Make the test less strict so it doesn't start to fail when future minor
releases come out.

Change-Id: I2864e10f23cf706b1bd4d97e9ae29ac6ea8ad3f3
Reviewed-on: https://go-review.googlesource.com/c/website/+/422637
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2022-08-26 16:05:51 +00:00
Tatiana Bradley 273f207302 _content/doc/devel, internal/history: call out "security" in relevant release notes
The security team found a few release notes that did not contain the
word security but included one or more security fixes. This CL updates
the relevant release notes.

Change-Id: I7cf4aeef65e5328a936c951781cd4f0bd54429d7
Reviewed-on: https://go-review.googlesource.com/c/website/+/421426
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-08-09 21:50:07 +00:00
Russ Cox 11196f2d29 internal/pkgdoc: fix rendering of generics like atomic.Pointer
Fixes golang/go#54200.

Change-Id: I407b7368c524746b0f14c6ec5495c509794e331a
Reviewed-on: https://go-review.googlesource.com/c/website/+/420794
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-08-03 16:34:40 +00:00
Russ Cox 70d30b4158 _content: add AUTHORS page, and CONTRIBUTORS redirect
Now that there's no AUTHORS file, go.dev/AUTHORS will become a dead link
as of Go 1.19, and tip.golang.org/AUTHORS is already one.
Write a page to keep those links not 404-ing.

Same is true for CONTRIBUTORS; redirect to AUTHORS.

For golang/go#53961.

Change-Id: I17cc932f3f870bf4b9970151ead4b5e72a94845b
Reviewed-on: https://go-review.googlesource.com/c/website/+/418932
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-07-25 21:24:22 +00:00
Hana (Hyang-Ah) Kim 6b9583b283 _content/ref: specify redirect for /ref and /ref/ using /ref/index.md
We want both `/ref` and `/ref/` to point to `/doc/#references` section.
All documents for /ref/* are available from this unified website, so we
can set up a redirect rule using the native redirect support provided by
the internal/web package instead of relying on the internal/redirect rule.

Fixes golang/go#53243

Change-Id: Ibed1aefc82f8b93ae14775efbb456b1571053eda
Reviewed-on: https://go-review.googlesource.com/c/website/+/413914
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-06-24 14:11:52 +00:00
Mike Seplowitz 5a173746ab _content/doc/devel: add ids for each minor version to release.html
Fixes golang/go#50503

Change-Id: Ib2d95e8b3c14ff9a30d3b5d4343c8e6d4d7d224c
Reviewed-on: https://go-review.googlesource.com/c/website/+/376454
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-06-02 22:01:12 +00:00
Dmitri Shuralyov 9faf03bf18 cmd/admingolangorg: update deployment to Go 1.16
Include a placeholder and initial value to clarify key/target inputs,
update 'golang.org' to 'go.dev', and use embed for the HTML template.

Also rewrite .gcloudignore to more effectively include only the bare
minimum files, hopefully in a way that won't get outdated as quickly.

Change-Id: Ic7b39fb6d8e54f93e657aae20bc4fd51c75039f4
Reviewed-on: https://go-review.googlesource.com/c/website/+/406374
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2022-05-16 15:10:09 +00:00
Russ Cox 5e441530dd all: gofmt
Gofmt to update doc comments to the new formatting.

For golang/go#51082.

Change-Id: I3573e720b522fe41f726d2fb4e3b988ee883872d
Reviewed-on: https://go-review.googlesource.com/c/website/+/399608
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-04-11 19:46:40 +00:00
Dmitri Shuralyov a3d868e5e5 cmd/golangorg: specify region in Cloud Build URLs explicitly
The GCP web UI remembers region selection across different visits.
If a user picks another region in another context, these links may
display a misleading page that doesn't show all intended build
history and trigger entries.

Explicitly include the region as global (non-regional) in the URL
to remove that pitfall and make the links more predictable.

Change-Id: Ie540853ef54bcfb253b28c492bbf56b251db28aa
Reviewed-on: https://go-review.googlesource.com/c/website/+/398536
Trust: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
2022-04-05 23:38:44 +00:00
Dmitri Shuralyov a4d623c5b7 cmd/golangorg, _content/talks: restore talks that use .html command
Invoke the template named "html" using the usual html/template way
instead of invoking it as a function (via the tmplfunc package) to
work around https://github.com/rsc/tmplfunc/issues/1.

The package golang.org/x/tools/present imports "html/template" from
the standard library, so its HTML.HTML field of type template.HTML
isn't understood to be content from a trusted source by the internal
backported copy. Use type aliases for those special types to fix that.

Fixes golang/go#51989.
Updates rsc/tmplfunc#1.

Change-Id: Ib9609f41b17407e297ea3bb111f346188aa7a9b0
Reviewed-on: https://go-review.googlesource.com/c/website/+/396234
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
2022-03-29 20:34:17 +00:00
Dan Kortschak 3e68d98e97 cmd/googlegolangorg: fix typo
Change-Id: I0e4c9d64454058a03a94ed8350a2022f6712c68a
Reviewed-on: https://go-review.googlesource.com/c/website/+/391575
Reviewed-by: Ian Lance Taylor <iant@google.com>
Trust: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-03-28 17:39:07 +00:00
Dmitri Shuralyov cc71b62800 internal/history: split Release summary into bug and security fixes
Make it possible to use the higher-level fix summary fields, instead of
CustomSummary, when a release has both bug fixes and security fixes.

Rewrite the recent hand-written custom summaries to use the new fields,
which produces equivalent output that differs largely in white-space
and some trivial consistency fixes.

Fixes golang/go#51719.
Updates golang/go#38488.
Updates golang/go#44918.

Change-Id: I672cea21f63cb4ab9764efb6cbc783cf503b791c
Reviewed-on: https://go-review.googlesource.com/c/website/+/393357
Trust: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Carlos Amedee <amedee@google.com>
2022-03-21 20:34:41 +00:00
Dmitri Shuralyov 39819c8bc7 cmd/golangorg: add test cases for recent release history
A following CL will make changes to how release content summary is
represented to support the new security policy, and migrate past
entries. Before doing that, add test cases for the recent releases,
so the upcoming diff will be more informative during review.

For golang/go#51719.
Updates golang/go#38488.

Change-Id: I7d26ac767e69c1ef73a94586f7c166878599864d
Reviewed-on: https://go-review.googlesource.com/c/website/+/393356
Trust: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Carlos Amedee <amedee@google.com>
Trust: Carlos Amedee <amedee@google.com>
2022-03-21 20:34:22 +00:00
Dmitri Shuralyov 2a575f4ba7 _content/doc: revert "temporarily add Go language specification documents"
Revert commit 2e3ad7d979 (CL 393115).
By now, the website is using Go content from release-branch.go1.18,
so this temporary mitigation is no longer needed.

Fixes golang/go#51686.

Change-Id: I47e3962cdffd88c708e1c150d9cf4bdcac217b24
Reviewed-on: https://go-review.googlesource.com/c/website/+/393355
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-03-16 15:34:51 +00:00
Russ Cox 7a60f303d8 all: handle Go 1.18 code on Go 1.16 AppEngine using new internal/backport/go/*
The immediate need was go/build, because the Go 1.16 go/build rejects
code that has //go:build without // +build, as Go 1.18 code now does.

But displaying code using generics would also have failed, for inability
to parse that code. Add the full go/ast, go/doc, go/format, go/parser,
go/printer, go/scanner, and go/token to fix those failures, which
would become more frequent as generics are used more inside the
standard library.

The code is all from the go1.18 tag of the Go repo, post-processed to
rewrite imports and apply gofmt -w -r 'any -> interface{}' to keep it
building with the other backports and with Go 1.16 syntax.

For golang/go#51686.

Change-Id: I1e14f4634d8bc09bdaa04c014eadb1be97ea5047
Reviewed-on: https://go-review.googlesource.com/c/website/+/393194
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-03-15 21:20:57 +00:00
Dmitri Shuralyov 2e3ad7d979 _content/doc: temporarily add Go language specification documents
The canonical location for these documents is in the main Go repository
in the doc directory. Due to go.dev/issue/51686, the website is using
Go content from release-branch.go1.17 rather than release-branch.go1.18.

Temporarily add a copy of the spec docs to x/website so it's possible to
view them at go.dev (in addition to tip.golang.org) while that issue is
being resolved.

For golang/go#51686.

Change-Id: Ia6640d6c32af631f562db1294d191f461373b9ee
Reviewed-on: https://go-review.googlesource.com/c/website/+/393115
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Dmitri Shuralyov <dmitshur@google.com>
2022-03-15 18:35:48 +00:00
Jamal Carvalho f520785296 internal/web: fix syntax rules hyperlinks
The filepath for the spec document changed and broke
the linkify step.

Fixes golang/go#50915

Change-Id: Ieafe9c665f4063fb9f9ddf74610925f123e2c249
Reviewed-on: https://go-review.googlesource.com/c/website/+/388859
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
2022-03-07 15:05:08 +00:00
Dmitri Shuralyov 42bfd6b6a6 cmd/golangorg: move test case that needs internet to live.txt
One test case added in CL 388016 depends on production resources,
specifically the snippet https://play.golang.org/p/MAohLsrz7JQ.go
served by the production instance of the Go playground.

This would be caught by TryBots where internet access is disabled,
but that didn't happen due to golang/go#51444.

Updates golang/go#51181.
Fixes golang/go#51439.

Change-Id: I4f1c5ea1a6ccad9ae4e5cbb749e3dee0b26731b5
Reviewed-on: https://go-review.googlesource.com/c/website/+/389394
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
Trust: Dmitri Shuralyov <dmitshur@google.com>
2022-03-02 21:21:45 +00:00
Jamal Carvalho 832feb7309 internal/play: support plain text response
Fixes golang/go#51181

Change-Id: I82f10320e86555a161cbfb5c5b79dfc331017003
Reviewed-on: https://go-review.googlesource.com/c/website/+/388016
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
2022-02-25 21:55:09 +00:00
Jamal Carvalho bbc52f685a cmd/screentest: remove download and install tests
The screentests for the download and install will
always fail because cmd/golangorg uses different
sources for data to render those pages on app engine.

Change-Id: I2ca67ba1bc0a830baa6fe1be1f1cd8b8f63ac9c5
Reviewed-on: https://go-review.googlesource.com/c/website/+/385915
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
2022-02-16 15:05:27 +00:00
Jamal Carvalho 2c19c4c8fc internal/screentest: capture response status from redirect
Change-Id: I6c7ae3eb3447c67d30b8dc2c4fb02f331ada15c8
Reviewed-on: https://go-review.googlesource.com/c/website/+/385634
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
Run-TryBot: Jamal Carvalho <jamalcarvalho@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2022-02-14 18:38:36 +00:00
Dmitri Shuralyov c5f7fbcc11 _content/talks: delete "presentStyle" template
With no "presentStyle" template defined, the template function with
the same name (defined in the internal/web package) starts to be used
in its place. Unlike the no-op wrapper template, the template function
correctly processes some of the legacy present syntax.

Fixes golang/go#50664.

Change-Id: I8a673e511b326f5c4f8a3a2666a2d1e65b5995ce
Reviewed-on: https://go-review.googlesource.com/c/website/+/379035
Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
Trust: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-19 17:53:47 +00:00
Jamal Carvalho cb323198ea {cmd,internal}/screentest: add config for remote debugger url
To have test runs output consistent screenshots across
different systems we allow for the use of a remote
instance of Chrome by providing a url to its debugger
as a flag. For example:

  go run ./cmd/screentest -d ws://localhost:9222

This is useful in a CI/CD environment to control the
chrome version and OS in which screenshots are taken.

Change-Id: I09b2e2d8e3056d7229808a57653d641677fc8cc3
Reviewed-on: https://go-review.googlesource.com/c/website/+/378475
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
2022-01-14 17:31:54 +00:00
Jonathan Amsterdam 60e69eecf2 cmd/locktrigger: generalize repo
Require a -repo flag for the repo to clone, instead of
hardcoded x/website.

Change-Id: I7fffd07b24d070e8e825fc3a5962bd506ea98f07
Reviewed-on: https://go-review.googlesource.com/c/website/+/377794
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2022-01-11 20:03:01 +00:00
Jamal Carvalho 41ad36154e {cmd,internal}/screentest: testcases run concurrently
Testcases for screentest will run concurrently
with a configurable max concurrency setting that
defaults to half of number of CPUs on a system.

Change-Id: I07e7ffd8d3867c47b709c160110a58ac60ee357c
Reviewed-on: https://go-review.googlesource.com/c/website/+/377256
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2022-01-10 21:22:00 +00:00
Jamal Carvalho 180886a91e cmd/golangorg: document screentest in README
Change-Id: I4e5dee5e8da28e7dd4d209b27a9febb13ef42105
Reviewed-on: https://go-review.googlesource.com/c/website/+/377354
Trust: Jamal Carvalho <jamalcarvalho@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-10 20:33:32 +00:00
Jamal Carvalho 58a5fe9a90 cmd,internal: move typescript transform to web package
To transform .ts files from any path on a site and to ensure
it works for all domains the transform logic is moved to the
web package.

Change-Id: I1ce62eb35dbdfb987ccc2f48e79c558bcdadfbbe
Reviewed-on: https://go-review.googlesource.com/c/website/+/374994
Trust: Jamal Carvalho <jamalcarvalho@google.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-01-06 01:14:01 +00:00
Jamal Carvalho 2aac4c0722 cmd/screentest: add test cases
Change-Id: Ia9bd2f814c56b8f6d24b37b5a045fd3a31d05892
Reviewed-on: https://go-review.googlesource.com/c/website/+/374775
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-04 20:37:27 +00:00
Dmitri Shuralyov 2b23ec4809 website: 2022 and onwards are the Years of the Gopher
The Go contribution guide was created in 2009 (commit 38a41eec67e5)
as part of the initial public release of Go.
It defined the standard copyright header for files in the Go tree.

Since files are copyrighted the year they are added,
having the current year in the header means it can be copied and
pasted into newly created files without further modification.

Given the year (2009 at the time) was written in a plain HTML file,
it needed to be updated every year to stay current.
Over the last 12 years, gophers assembled and performed this task:

• commit 38a41eec67e5  contribute.html (initial commit)
• go.dev/cl/184055     doc/contribute.html: change copyright year
• go.dev/cl/3907042    doc: contribution copyright year 2011
• go.dev/cl/5531048    doc: use 2012 for year in model standard copyright header
• go.dev/cl/7034044    doc: update standard copyright header
• go.dev/cl/46660043   2014: Year of the Gopher.
• go.dev/cl/2087       doc: 2015 will be the Year of the Gopher.
• go.dev/cl/18117      doc: 2016 is the Year of the Gopher.
• go.dev/cl/35240      doc: 2017 is the Year of the Gopher
• go.dev/cl/85775      doc: 2018 is the Year of the Gopher
• go.dev/cl/155928     doc: 2019 is the Year of the Gopher
• go.dev/cl/213017     doc: 2020 is the Year of the Gopher
• go.dev/cl/280163     doc: 2021 is the Year of the Gopher

In a way, this yearly tradition of updating HTML by hand was fun¹,
but we've now reached a convenient time to share the joy with our
friendly robot gophers.

Previously, the contribution guide lived in the main Go repository,
and a part of the website serving code was still in x/tools/godoc.
In 2021, Russ consolidated the remaining Go website content and code
all in x/website (for example, see CL 291693 and CL 293420). So now
everything we need is in one repo, making this trivial to automate,
and in doing so mark 2022 and beyond as the Years of the Gopher.

¹ See the commit messages and conversations in the linked CLs.

Change-Id: Ieab904b77d764c3e191f75923369ce461d7102c6
Reviewed-on: https://go-review.googlesource.com/c/website/+/375056
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
2022-01-04 19:56:33 +00:00
Jamal Carvalho afa30cd2ef cmd/screentest: use default testdata when run with go command
Change-Id: I9e3a1a71ec62cfbb171f55e765b5f58d3ddba4e5
Reviewed-on: https://go-review.googlesource.com/c/website/+/373717
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2022-01-04 16:25:02 +00:00
Jamal Carvalho 56b50be279 website: create typescript file handler
To allow for the use of TypeScript in go.dev pages
added a handler for TypeScript files served from
_content/ts. Files requested from this directory
are first transformed from TypeScript to JavaScript
using github.com/evanw/esbuild. JavaScript output is
written to a simple cache so subsequent requests skip
the tranformation step.

Change-Id: I0a161ce3dd20eaddddd5d369d359c65c90d9f607
Reviewed-on: https://go-review.googlesource.com/c/website/+/373718
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2021-12-29 17:53:46 +00:00
Jamal Carvalho faa0890080 {cmd,internal}/screentest: add support for templates
Screentest scripts are parsed as go templates. Passing
headers from the command line is replaced by the header
keyword in test scripts. Data can be interpolated into
headers using go template strings.

For example `header Authorization: Bearer {{.Token}}`
would become `header Authorization: Bearer abcdef` after
running `screentest -vars "Token:abcdef" testdata/file.txt`.

Change-Id: Ia27b9e12c68ca3bdbe609d3714d57d8867c2b351
Reviewed-on: https://go-review.googlesource.com/c/website/+/373715
Trust: Jamal Carvalho <jamalcarvalho@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-12-22 16:53:20 +00:00
Jamal Carvalho 91908baf20 internal/screentest: add support for evaluating javascript
Added the eval keyword to allow for evaluating JS. Useful for
manipulating or hiding DOM elements prior to screenshot capture.

Change-Id: I508f3949c2eed7d55fc4e168781ab4c3e00edb5b
Reviewed-on: https://go-review.googlesource.com/c/website/+/373714
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Jamal Carvalho <jamalcarvalho@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-12-21 22:12:49 +00:00