1
0
mirror of https://github.com/golang/go synced 2024-11-26 07:17:59 -07:00

doc/go1.17: assorted fixes

Change-Id: I64235ad920240de9e2414b9ee6f4cfc4006b2862
Reviewed-on: https://go-review.googlesource.com/c/go/+/327709
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2021-06-13 16:00:28 -07:00
parent 8a5a6f46dc
commit 7841cb14d9

View File

@ -59,7 +59,7 @@ Do not send CLs removing the interior tags from such phrases.
</ul> </ul>
<p> <p>
These enhancements were added to simplify writing code that conforms The package unsafe enhancements were added to simplify writing code that conforms
to <code>unsafe.Pointer</code>'s <a href="/pkg/unsafe/#Pointer">safety to <code>unsafe.Pointer</code>'s <a href="/pkg/unsafe/#Pointer">safety
rules</a>, but the rules remain unchanged. In particular, existing rules</a>, but the rules remain unchanged. In particular, existing
programs that correctly use <code>unsafe.Pointer</code> remain programs that correctly use <code>unsafe.Pointer</code> remain
@ -735,7 +735,7 @@ func Foo() bool {
These components were always interpreted as decimal, but some operating systems treat them as octal. These components were always interpreted as decimal, but some operating systems treat them as octal.
This mismatch could hypothetically lead to security issues if a Go application was used to validate IP addresses This mismatch could hypothetically lead to security issues if a Go application was used to validate IP addresses
which were then used in their original form with non-Go applications which interpreted components as octal. Generally, which were then used in their original form with non-Go applications which interpreted components as octal. Generally,
it is advisable to always re-encoded values after validation, which avoids this class of parser misalignment issues. it is advisable to always re-encode values after validation, which avoids this class of parser misalignment issues.
</p> </p>
</dd> </dd>
</dl><!-- net --> </dl><!-- net -->
@ -786,7 +786,7 @@ func Foo() bool {
<dd> <dd>
<p><!-- CL 268020 --> <p><!-- CL 268020 -->
The <a href="/pkg/os/#File.WriteString"><code>File.WriteString</code></a> method The <a href="/pkg/os/#File.WriteString"><code>File.WriteString</code></a> method
has been optimized to no longer make a copy of the input string. has been optimized to not make a copy of the input string.
</p> </p>
</dd> </dd>
</dl><!-- os --> </dl><!-- os -->
@ -812,6 +812,14 @@ func Foo() bool {
The <a href="/pkg/reflect/#ArrayOf"><code>ArrayOf</code></a> function now panics when The <a href="/pkg/reflect/#ArrayOf"><code>ArrayOf</code></a> function now panics when
called with a negative length. called with a negative length.
</p> </p>
<p><!-- CL 301652 -->
Checking the <a href="/pkg/reflect/#Type"><code>Type.ConvertibleTo</code></a> method
is no longer sufficient to guarantee that a call to
<a href="/pkg/reflect/#Value.Convert"><code>Value.Convert</code></a> will not panic.
It may panic when converting `[]T` to `*[N]T` if the slice's length is less than N.
See the language changes section above.
</p>
</dd> </dd>
</dl><!-- reflect --> </dl><!-- reflect -->
@ -838,7 +846,7 @@ func Foo() bool {
<dd> <dd>
<p><!-- CL 170079, CL 170080 --> <p><!-- CL 170079, CL 170080 -->
The <code>strconv</code> package now uses Ulf Adams's Ryū algorithm for formatting floating-point numbers. The <code>strconv</code> package now uses Ulf Adams's Ryū algorithm for formatting floating-point numbers.
This algorithm improves performance on most inputs, and is more than 99% faster on worst-case inputs. This algorithm improves performance on most inputs and is more than 99% faster on worst-case inputs.
</p> </p>
<p><!-- CL 314775 --> <p><!-- CL 314775 -->