[website] _content/doc/effective_go: update for Go 1.26 and concise warning

0 views
Skip to first unread message

Hyang-Ah Hana Kim (Gerrit)

unread,
Apr 8, 2026, 6:59:23 PM (6 hours ago) Apr 8
to goph...@pubsubhelper.golang.org, Hyang-Ah Hana Kim, golang-co...@googlegroups.com

Hyang-Ah Hana Kim has uploaded the change for review

Commit message

_content/doc/effective_go: update for Go 1.26 and concise warning

Move warning note to top, make it concise and include release notes link.
Update 'new' section for Go 1.26 expression arguments - strictly
speaking, this doc is frozen so we don't need to update it. But since
`new` is a language builtin so mention it.
Change-Id: I3e857f5842d859b534726f2d639b6eea670f8dca

Change diff

diff --git a/_content/doc/effective_go.html b/_content/doc/effective_go.html
index 0b7389a..d54a3cf 100644
--- a/_content/doc/effective_go.html
+++ b/_content/doc/effective_go.html
@@ -4,6 +4,10 @@
"Breadcrumb": true
}-->

+<div class="Note">
+<strong>Note:</strong> This document was written for Go's release in 2009 and is not actively updated. While it remains a good guide for core language idioms, it does not cover significant changes to the ecosystem (like modules or generics) or libraries added since. For a complete list of changes, see the <a href="/doc/devel/release">release notes</a>. See <a href="/issue/28782">issue 28782</a> for context.
+</div>
+
<h2 id="introduction">Introduction</h2>

<p>
@@ -35,23 +39,7 @@
should read first.
</p>

-<p>
-Note added January, 2022:
-This document was written for Go's
-release in 2009, and has not been updated significantly since.
-Although it is a good guide to understand how to use the language
-itself, thanks to the stability of the language, it says little
-about the libraries and nothing about significant changes to the
-Go ecosystem since it was written, such as the build system, testing,
-modules, and polymorphism.
-There are no plans to update it, as so much has happened and a large
-and growing set of documents, blogs, and books do a fine job of
-describing modern Go usage.
-Effective Go continues to be useful, but the reader should
-understand it is far from a complete guide.
-See <a href="/issue/28782">issue
-28782</a> for context.
-</p>
+

<h3 id="examples">Examples</h3>

@@ -1013,6 +1001,10 @@
</p>

<p>
+Starting in Go 1.26, <code>new</code> also allows its operand to be an expression, specifying the initial value of the variable. For example, <code>new(int64(300))</code> allocates a new <code>int64</code> with value <code>300</code> and returns its address.
+</p>
+
+<p>
Since the memory returned by <code>new</code> is zeroed, it's helpful to arrange
when designing your data structures that the
zero value of each type can be used without further initialization. This means a user of
@@ -3483,6 +3475,8 @@
Go is powerful enough to make a lot happen in a few lines.
</p>

+
+
<!--
TODO
<pre>

Change information

Files:
  • M _content/doc/effective_go.html
Change size: S
Delta: 1 file changed, 11 insertions(+), 17 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: I3e857f5842d859b534726f2d639b6eea670f8dca
Gerrit-Change-Number: 764340
Gerrit-PatchSet: 1
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Hyang-Ah Hana Kim (Gerrit)

unread,
Apr 8, 2026, 7:01:23 PM (6 hours ago) Apr 8
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Hyang-Ah Hana Kim uploaded new patchset

Hyang-Ah Hana Kim uploaded patch set #2 to this change.
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: I3e857f5842d859b534726f2d639b6eea670f8dca
Gerrit-Change-Number: 764340
Gerrit-PatchSet: 2
unsatisfied_requirement
satisfied_requirement
open
diffy

Robert Griesemer (Gerrit)

unread,
Apr 8, 2026, 7:20:02 PM (5 hours ago) Apr 8
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Robert Griesemer, golang-co...@googlegroups.com
Attention needed from Hyang-Ah Hana Kim and Robert Griesemer

Robert Griesemer voted and added 7 comments

Votes added by Robert Griesemer

Code-Review+2

7 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Robert Griesemer . resolved

Thanks for doing this. Some suggestions.

File _content/doc/effective_go.html
Line 9, Patchset 2 (Latest):is not actively updated. While it remains a good guide for core language idioms,
Robert Griesemer . unresolved

s/core language idioms/using the core language/

Line 10, Patchset 2 (Latest):it does not cover significant changes to the ecosystem (like modules or generics)
Robert Griesemer . unresolved

... it does not cover significant changes to the language (generics), ecosystem (modules), or libraries added since.

Line 1002, Patchset 2 (Latest):<code>new(T)</code> allocates zeroed storage for a new item of type
Robert Griesemer . unresolved

s/item/variable/

(because that's what it is, and it also ties the new paragraph to this paragraph.)

Line 1009, Patchset 2 (Latest):Starting in Go 1.26, <code>new</code> also allows its operand to be an expression, specifying the initial value of the variable. For example, <code>new(int64(300))</code> allocates a new <code>int64</code> with value <code>300</code> and returns its address.
Robert Griesemer . unresolved

... also accepts an (value) expression as an argument, which specifies the initial ...

Line 1009, Patchset 2 (Latest):Starting in Go 1.26, <code>new</code> also allows its operand to be an expression, specifying the initial value of the variable. For example, <code>new(int64(300))</code> allocates a new <code>int64</code> with value <code>300</code> and returns its address.
Robert Griesemer . unresolved

s/in/with/ (?)

Line 1009, Patchset 2 (Latest):Starting in Go 1.26, <code>new</code> also allows its operand to be an expression, specifying the initial value of the variable. For example, <code>new(int64(300))</code> allocates a new <code>int64</code> with value <code>300</code> and returns its address.
Robert Griesemer . unresolved

... allocates a new variable of type <code>int64</code>, initialized to 300, and returns its address.

Open in Gerrit

Related details

Attention is currently required from:
  • Hyang-Ah Hana Kim
  • Robert Griesemer
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: I3e857f5842d859b534726f2d639b6eea670f8dca
Gerrit-Change-Number: 764340
Gerrit-PatchSet: 2
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Robert Griesemer <g...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Attention: Robert Griesemer <g...@golang.org>
Gerrit-Comment-Date: Wed, 08 Apr 2026 23:19:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Hyang-Ah Hana Kim (Gerrit)

unread,
Apr 8, 2026, 9:25:46 PM (3 hours ago) Apr 8
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Hyang-Ah Hana Kim and Robert Griesemer

Hyang-Ah Hana Kim uploaded new patchset

Hyang-Ah Hana Kim uploaded patch set #3 to this change.
Open in Gerrit

Related details

Attention is currently required from:
  • Hyang-Ah Hana Kim
  • Robert Griesemer
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: I3e857f5842d859b534726f2d639b6eea670f8dca
Gerrit-Change-Number: 764340
Gerrit-PatchSet: 3
satisfied_requirement
unsatisfied_requirement
open
diffy

Hyang-Ah Hana Kim (Gerrit)

unread,
Apr 8, 2026, 9:26:59 PM (3 hours ago) Apr 8
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Robert Griesemer, Robert Griesemer, golang-co...@googlegroups.com
Attention needed from Robert Griesemer

Hyang-Ah Hana Kim added 6 comments

File _content/doc/effective_go.html
Line 9, Patchset 2:is not actively updated. While it remains a good guide for core language idioms,
Robert Griesemer . resolved

s/core language idioms/using the core language/

Hyang-Ah Hana Kim

Done

Line 10, Patchset 2:it does not cover significant changes to the ecosystem (like modules or generics)
Robert Griesemer . resolved

... it does not cover significant changes to the language (generics), ecosystem (modules), or libraries added since.

Hyang-Ah Hana Kim

Done

Line 1002, Patchset 2:<code>new(T)</code> allocates zeroed storage for a new item of type
Robert Griesemer . resolved

s/item/variable/

(because that's what it is, and it also ties the new paragraph to this paragraph.)

Hyang-Ah Hana Kim

Done

Line 1009, Patchset 2:Starting in Go 1.26, <code>new</code> also allows its operand to be an expression, specifying the initial value of the variable. For example, <code>new(int64(300))</code> allocates a new <code>int64</code> with value <code>300</code> and returns its address.
Robert Griesemer . resolved

s/in/with/ (?)

Hyang-Ah Hana Kim

Done

Line 1009, Patchset 2:Starting in Go 1.26, <code>new</code> also allows its operand to be an expression, specifying the initial value of the variable. For example, <code>new(int64(300))</code> allocates a new <code>int64</code> with value <code>300</code> and returns its address.
Robert Griesemer . resolved

... also accepts an (value) expression as an argument, which specifies the initial ...

Hyang-Ah Hana Kim

Done

Line 1009, Patchset 2:Starting in Go 1.26, <code>new</code> also allows its operand to be an expression, specifying the initial value of the variable. For example, <code>new(int64(300))</code> allocates a new <code>int64</code> with value <code>300</code> and returns its address.
Robert Griesemer . resolved

... allocates a new variable of type <code>int64</code>, initialized to 300, and returns its address.

Hyang-Ah Hana Kim

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Robert Griesemer
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: I3e857f5842d859b534726f2d639b6eea670f8dca
Gerrit-Change-Number: 764340
Gerrit-PatchSet: 3
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Robert Griesemer <g...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-Attention: Robert Griesemer <g...@golang.org>
Gerrit-Comment-Date: Thu, 09 Apr 2026 01:26:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Robert Griesemer <g...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Hyang-Ah Hana Kim (Gerrit)

unread,
Apr 8, 2026, 9:29:53 PM (3 hours ago) Apr 8
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, Robert Griesemer, Robert Griesemer, golang-co...@googlegroups.com
Attention needed from Robert Griesemer

Hyang-Ah Hana Kim voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Robert Griesemer
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: I3e857f5842d859b534726f2d639b6eea670f8dca
Gerrit-Change-Number: 764340
Gerrit-PatchSet: 2
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Robert Griesemer <g...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-Attention: Robert Griesemer <g...@golang.org>
Gerrit-Comment-Date: Thu, 09 Apr 2026 01:29:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages