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

18 Коммитов

Автор SHA1 Сообщение Дата
Ian Lance Taylor ac2f5a4e42 doc/articles/race_detector: update for Go 1.22 loop variable changes
One of the examples was no longer racy. Change the example
to use a variable declared outside of the loop, to make it racy.

Fixes golang/go#69261

Change-Id: I79d5c9372d4badbdaccdea53e8b395291805dc47
Reviewed-on: https://go-review.googlesource.com/c/website/+/610975
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-09-05 00:50:20 +00:00
Mauri de Souza Meneguzzo fc3ac592e3 _content/doc/articles/race_detector: document linux/s390x support
Support for linux/s390x was added in Go 1.19.

Change-Id: I939601ad707da5d6a81ba85662b1ed37b0feccbb
GitHub-Last-Rev: 837e2a8c06
GitHub-Pull-Request: golang/website#262
Reviewed-on: https://go-review.googlesource.com/c/website/+/544477
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2023-12-08 16:11:53 +00:00
Russ Cox 0a7f378581 cmd/golangorg: check for invalid or broken links in served HTML
Test that links are to /foo not https://go.dev/foo
and also check that the links actually point at real pages.
Manually fix problems that the test found.

For golang/go#37047.

Change-Id: I825eec3c2cadb9d259caff51cd893f3023ab533a
Reviewed-on: https://go-review.googlesource.com/c/website/+/548059
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-08 03:23:52 +00:00
Ian Lance Taylor b94b1663e6 _content: correct pkg.dev.go links to pkg.go.dev
Fixes golang/go#62225

Change-Id: I6de01f1176494d3c83c638333194201013e21f85
Reviewed-on: https://go-review.googlesource.com/c/website/+/522075
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Eli Bendersky <eliben@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
2023-08-23 13:47:51 +00:00
Than McIntosh 01ff1375ee _content/doc/articles/race_detector: document windows C compiler version requirements
Add a note documenting the requirement (as of Go 1.21) on Windows that
the installed C compiler support mingw-w64 version 8 or later, which
provides libsynchronization.a.

Fixes golang/go#61058.

Change-Id: I891d7d32df41387e1671a1ec9bac722c47a68ee5
Reviewed-on: https://go-review.googlesource.com/c/website/+/508461
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>
2023-07-11 18:19:51 +00:00
Frederick Mixell 78a220a4fa _content: Breadcrumbs added to children pages.
Added to all doc children page with doclayout.
Added to Why Go pages.
Added to Security pages.

Video of Changes:
https://drive.google.com/file/d/1wX9e9K9H9wPTaLLQHh15-cWzMTMRr9DO/view?usp=sharing

Change-Id: I0fbf8e925e7fa357762d8eebd2bf13d561d49d86
Reviewed-on: https://go-review.googlesource.com/c/website/+/432775
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2023-02-14 18:22:49 +00:00
Ian Lance Taylor 05f06604c6 _content/doc/articles/race_detector: cgo requires a C compiler
Fixes golang/go#56937

Change-Id: Ia9aca2c8f57e5f5641f40712df00d932578d13a5
Reviewed-on: https://go-review.googlesource.com/c/website/+/453435
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
2022-11-28 20:20:15 +00:00
Frederik Zipp 4056b246ea all: fix a lot of typos
Change-Id: I0754d18f4c3c3d5dfa0c34b4bc154a35ac20b917
Reviewed-on: https://go-review.googlesource.com/c/website/+/411794
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-06-15 16:32:49 +00:00
George Looshch f66592d150 _content/doc: fix inconsistent tabs in code snippets
Replace real tabs with 4 spaces in code snippets to make indentation
consistent

Fixes golang/go#52255

Change-Id: Ida06a1dd2c2cd3100c32d6c29febf60aba2e20d7
Reviewed-on: https://go-review.googlesource.com/c/website/+/399374
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2022-05-24 14:51:34 +00:00
Meng Zhuo d6638d3d92 _content: document cgo requirement for race detector
The race detector doc doesn't state cgo,
the content is basically as ALTree suggested in issue 51235.

Fixes golang/go#51235

Change-Id: I03356c01f4542e69a02c712063afb77ae68cc90f
Reviewed-on: https://go-review.googlesource.com/c/website/+/386454
Reviewed-by: DO NOT USE <iant@google.com>
Trust: Dmitri Shuralyov <dmitshur@google.com>
2022-02-25 04:25:08 +00:00
Russ Cox ab4f479b5c all: make golang.org and go.dev links relative
Now that there is one site, update all golang.org links to go.dev.
But for any links being served from go.dev, make host-relative,
so that when serving golang.google.cn, we stay on that host as
much as possible.

Change-Id: Id6e1303059b5522846a64202bc1a8b81dc3854cd
Reviewed-on: https://go-review.googlesource.com/c/website/+/365095
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:42:44 +00:00
Bartłomiej Klimczak 0473aa5d47 _content/doc/articles/wiki: replace "io/ioutil" with "os" package
In Go 1.16 we deprecated "io/ioutil";
see https://golang.org/doc/go1.16#ioutil.
Update the wiki blog post to use the new API instead.

Change-Id: I546c4960ed26845854e6add9469929e68c47abf7
GitHub-Last-Rev: 163df21ffa
GitHub-Pull-Request: golang/website#90
Reviewed-on: https://go-review.googlesource.com/c/website/+/347709
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
2021-11-16 00:39:12 +00:00
Hana ddb58f2a77 all: replace the example repo import path
github.com/golang/example is actually a mirror
of go.googlesource.com/example
which hosts the golang.org/x/example module.
The path mismatches causes build failures.
This CL replaces github.com/golang/example with
golang.org/x/example when appropriate.

I think the use case in
_content/doc/articles/go_command.html is better
served with a repo in github.com or widely known
source hosting sites. Otherwise, the flow may be
confusing. So, I used github.com/golang/protobuf.

Also replaced godoc.org links with pkg.go.dev links.

Still not sure if the instructions in the old blog
posts and articles continue to work though.
For blog posts, I am not sure what to do -
there is historical merit in preserving old
contents (that's the point of blogs, isn't it?)
However, old, broken examples can be confusing
for new users. Keeping all blog posts up-to-date
isn't scalable either.

The gopath_code.html and go_command.html can be
confusing for users who use latest go.
I think we need to make them more clear that they
are obsolete or archive(?) them.

Change-Id: Iefe0cc94b0690dc52933ebce214104e94d9b6808
Reviewed-on: https://go-review.googlesource.com/c/website/+/347551
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-09-03 14:47:29 +00:00
Russ Cox 68b6eba5d5 cmd/golangorg: fix regexp match with ^ and $
Also fix doc/articles/wiki code file references.

Fixes golang/go#47759.

Change-Id: Idd0cce627f594898c805269ae7cd0e0f980aec8f
Reviewed-on: https://go-review.googlesource.com/c/website/+/343289
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-08-18 16:21:07 +00:00
Russ Cox 4c9e549253 internal/godoc: clean up use of templates
- convert from text/template to html/template
- use proper template set
- always pass *godoc.Page to templates, with custom value in .Data
- move stateful site template functions to methods on *godoc.Page
- unexport Presentation.ServeFile: ServeHTTP is good enough
- reorder api.DB.Func args to match source order (pkg first)
- rename lib/godoc/godoc.html to lib/godoc/site.html
  (lib/godoc itself must stay lib/godoc because of links to other content it holds).

Change-Id: I873f17db20107fdab11d276932e6d847a6081015
Reviewed-on: https://go-review.googlesource.com/c/website/+/317655
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-14 17:41:27 +00:00
Christopher Thomas 580daa9e8f _content/doc/articles/wiki: update 'OS X' to 'macOS'
As macOS is now in version 11, or XI, which Go supports. There is no
need to specify OS X as a prerequisite now, it would be more correct
to specify just 'macOS'.

Change-Id: Ida07bb513e75c9700e77eb57278604e76d2afa24
GitHub-Last-Rev: 8a47eedc88
GitHub-Pull-Request: golang/website#50
Reviewed-on: https://go-review.googlesource.com/c/website/+/312712
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Heschi Kreinick <heschi@google.com>
2021-05-27 15:20:36 +00:00
Russ Cox e43fe083f8 _content/doc/articles/wiki: delete go.mod
This was added in CL 207263 to isolate these from the
main repo. That's not a concern anymore, and it's keeping
them out of the website module and therefore out of the embed.
Delete the go.mod to put them back.

Fixes golang/go#44314.

Change-Id: I36c20607d6132ad089ddae8150abe220eb90d3fd
Reviewed-on: https://go-review.googlesource.com/c/website/+/293410
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-02-18 03:22:24 +00:00
Russ Cox 04c64e9028 _content/doc: copy docs from main Go repo
These are all the docs that aren't tied to active work in the main repo
(basically all docs, except the spec, memory model, assembler manual,
and in-progress release notes).

Copied from Go ff0e93ea3, deleted there in CL 291711.

Change-Id: Ia269abfc0fa207c036bb7b3c13e4167e80005d2c
Reviewed-on: https://go-review.googlesource.com/c/website/+/291693
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-02-16 02:04:20 +00:00