mirror of
https://github.com/golang/go
synced 2024-11-26 18:26:48 -07:00
6d0bf438e3
IsLocal reports whether a path lexically refers to a location contained within the directory in which it is evaluated. It identifies paths that are absolute, escape a directory with ".." elements, and (on Windows) paths that reference reserved device names. For #56219. Change-Id: I35edfa3ce77b40b8e66f1fc8e0ff73cfd06f2313 Reviewed-on: https://go-review.googlesource.com/c/go/+/449239 Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Joseph Tsai <joetsai@digital-static.net> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Joedian Reid <joedian@golang.org>
838 lines
31 KiB
HTML
838 lines
31 KiB
HTML
<!--{
|
|
"Title": "Go 1.20 Release Notes",
|
|
"Path": "/doc/go1.20"
|
|
}-->
|
|
|
|
<!--
|
|
NOTE: In this document and others in this directory, the convention is to
|
|
set fixed-width phrases with non-fixed-width spaces, as in
|
|
<code>hello</code> <code>world</code>.
|
|
Do not send CLs removing the interior tags from such phrases.
|
|
-->
|
|
|
|
<style>
|
|
main ul li { margin: 0.5em 0; }
|
|
</style>
|
|
|
|
<h2 id="introduction">DRAFT RELEASE NOTES — Introduction to Go 1.20</h2>
|
|
|
|
<p>
|
|
<strong>
|
|
Go 1.20 is not yet released. These are work-in-progress
|
|
release notes. Go 1.20 is expected to be released in February 2023.
|
|
</strong>
|
|
</p>
|
|
|
|
<h2 id="language">Changes to the language</h2>
|
|
|
|
<p>
|
|
TODO: complete this section
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/8606 -->
|
|
TODO: <a href="https://go.dev/issue/8606">https://go.dev/issue/8606</a>: define that structs are compared field-by-field as listed in source code
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/46505 -->
|
|
TODO: <a href="https://go.dev/issue/46505">https://go.dev/issue/46505</a>: allow conversion from slice to array
|
|
</p>
|
|
|
|
<h2 id="ports">Ports</h2>
|
|
|
|
<p>
|
|
TODO: complete this section, or delete if not needed
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/53466 -->
|
|
TODO: <a href="https://go.dev/issue/53466">https://go.dev/issue/53466</a>: add freebsd/riscv64 port
|
|
</p>
|
|
|
|
<h2 id="tools">Tools</h2>
|
|
|
|
<h3 id="go-command">Go command</h3>
|
|
|
|
<p><!-- https://go.dev/issue/38687, CL 421440 -->
|
|
TODO: <a href="https://go.dev/cl/421440">https://go.dev/cl/421440</a>: cmd/go: add go generate -skip flag
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/45454 -->
|
|
TODO: <a href="https://go.dev/issue/45454">https://go.dev/issue/45454</a>: provide build tags for architecture environment variables
|
|
</p>
|
|
|
|
<p><!-- CL 448357: cmd/go: print test2json start events -->
|
|
TODO: CL 448357: cmd/go: print test2json start events
|
|
</p>
|
|
|
|
<p><!-- CL 432535: cmd/go: don't install most GOROOT .a files in pkg -->
|
|
The Go distribution no longer ships with pre-compiled <code>.a</code>
|
|
files for most of the packages in <code>GOROOT</code>, now only including
|
|
.a files for the five packages in <code>GOROOT</code> that use <code>cgo</code>.
|
|
Instead, those packages will be built as needed and cached in the build
|
|
cache, as is already done for non-<code>main</code> packages outside
|
|
<code>GOROOT</code>. Further, <code>go</code> <code>install</code> will
|
|
also not install <code>.a</code> files for <code>GOROOT</code> packages
|
|
except for those that use <code>cgo</code>. These changes are intended to
|
|
reduce the size of the Go distribution, in some cases by up to two-thirds.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/37015 -->
|
|
When the main module is located within <code>GOPATH/src</code>,
|
|
<code>go</code> <code>install</code> no longer installs libraries for
|
|
non-<code>main</code> packages to <code>GOPATH/pkg</code>,
|
|
and <code>go</code> <code>list</code> no longer reports a <code>Target</code>
|
|
field for such packages. (In module mode, compiled packages are stored in the
|
|
<a href="https://pkg.go.dev/cmd/go#hdr-Build_and_test_caching">build cache</a>
|
|
only, but <a href="https://go.dev/issue/37015">a bug</a> had caused
|
|
the <code>GOPATH</code> install targets to unexpectedly remain in effect.)
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/41696, CL 416094 -->
|
|
The <code>-i</code> flag is no longer accepted by
|
|
<code>go</code> <code>build</code> and <code>go</code> <code>test</code>.
|
|
The flag has been <a href="https://go.dev/issue/41696">deprecated since Go 1.16</a>.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/50332 -->
|
|
The <code>go</code> subcommands now accept
|
|
<code>-C</code> <code><dir></code> to change directory to <dir>
|
|
before performing the command, which may be useful for scripts that need to
|
|
execute commands in multiple different modules.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/41583 -->
|
|
The <code>go</code> <code>test</code> command now accepts
|
|
<code>-skip</code> <code><pattern></code> to skip tests or subtests
|
|
matching <code><pattern></code>.
|
|
</p>
|
|
|
|
<h4 id="go-version"><code>go</code> <code>version</code></h4>
|
|
|
|
<p><!-- https://go.dev/issue/48187 -->
|
|
The <code>go</code> <code>version</code> <code>-m</code> command
|
|
now supports reading more types of Go binaries, most notably, Windows DLLs
|
|
built with <code>go</code> <code>build</code> <code>-buildmode=c-shared</code>
|
|
and Linux binaries without execute permission.
|
|
</p>
|
|
|
|
<h3 id="cover">Cover</h3>
|
|
|
|
<p><!-- CL 436236, CL 401236, CL 438503 -->
|
|
TODO coverage
|
|
</p>
|
|
|
|
<h3 id="vet">Vet</h3>
|
|
|
|
<p><!-- https://go.dev/issue/48801, CL 354010 -->
|
|
TODO: <a href="https://go.dev/issue/48801">https://go.dev/issue/48801</a>: check for time formats with 2006-02-01
|
|
</p>
|
|
|
|
<p><!-- CL 447256 --><!-- https://go.dev/issue/55972: extend the loopclosure analysis to parallel subtests -->
|
|
TODO: https://go.dev/issue/55972: extend the loopclosure analysis to parallel subtests
|
|
</p>
|
|
|
|
<h2 id="runtime">Runtime</h2>
|
|
|
|
<p>
|
|
TODO: complete this section, or delete if not needed
|
|
</p>
|
|
|
|
<h2 id="compiler">Compiler</h2>
|
|
|
|
<p><!-- https://go.dev/issue/49390 -->
|
|
TODO: <a href="https://go.dev/issue/49390">https://go.dev/issue/49390</a>: clarify whether "-l" and "-N" compiler flags are actually supported
|
|
</p>
|
|
|
|
<h2 id="linker">Linker</h2>
|
|
|
|
<p>
|
|
TODO: complete this section, or delete if not needed
|
|
</p>
|
|
|
|
<h2 id="bootstrap">Bootstrap</h2>
|
|
|
|
<p><!-- https://go.dev/issue/44505 -->
|
|
TODO: <a href="https://go.dev/issue/44505">https://go.dev/issue/44505</a>: adopt Go 1.17.13 as bootstrap toolchain for Go 1.20
|
|
</p>
|
|
|
|
<h2 id="library">Core library</h2>
|
|
|
|
<h3 id="crypto/ecdh">New <code>crypto/ecdh</code> package</h3>
|
|
|
|
<p><!-- https://go.dev/issue/52221, CL 398914 -->
|
|
TODO: complete this section
|
|
</p>
|
|
|
|
<h3 id="errors">Wrapping multiple errors</h3>
|
|
|
|
<p><!-- CL 432898 -->
|
|
Go 1.20 expands support for error wrapping to permit an error to
|
|
wrap multiple other errors.
|
|
</p>
|
|
<p>
|
|
An error <code>e</code</e> can wrap more than one error by providing
|
|
an <code>Unwrap</code> method that returns a <code>[]error</code>.
|
|
</p>
|
|
<p>
|
|
The <a href="/pkg/errors/#Is"><code>errors.Is</code></a> and
|
|
<a href="/pkg/errors/#As"><code>errors.As</code></a> functions
|
|
have been updated to inspect multiply wrapped errors.
|
|
</p>
|
|
<p>
|
|
The <a href="/pkg/fmt/#Errorf"><code>fmt.Errorf</code></a> function
|
|
now supports multiple occurrances of the <code>%w</code> format verb,
|
|
which will cause it to return an error that wraps all of those error operands.
|
|
</p>
|
|
<p>
|
|
The new function <a href="/pkg/errors/#Join"><code>errors.Join</code></a>
|
|
returns an error wrapping a list of errors.
|
|
</p>
|
|
|
|
<h3 id="http_responsecontroller">HTTP ResponseController</h3>
|
|
|
|
<p>
|
|
The new
|
|
<a href="/pkg/net/http/#ResponseController"><code>"net/http".ResponseController</code></a>
|
|
type provides access to extended per-request functionality not handled by the
|
|
<a href="/pkg/net/http/#ResponseWriter"><code>"net/http".ResponseWriter</code></a> interface.
|
|
</p>
|
|
|
|
<p>
|
|
Previously, we have added new per-request functionality by defining optional
|
|
interfaces which a <code>ResponseWriter</code> can implement, such as
|
|
<a href="/pkg/net/http/#Flusher"><code>Flusher<code></a>. These interfaces
|
|
are not discoverable and clumsy to use.
|
|
</p>
|
|
|
|
<p>
|
|
The <code>ResponseController</code> type provides a clearer, more discoverable way
|
|
to add per-handler controls. Two such controls also added in Go 1.20 are
|
|
<code>SetReadDeadline</code> and <code>SetWriteDeadline</code>, which allow setting
|
|
per-request read and write deadlines. For example:
|
|
</p>
|
|
|
|
<pre>
|
|
func RequestHandler(w ResponseWriter, r *Request) {
|
|
rc := http.NewResponseController(w)
|
|
rc.SetWriteDeadline(0) // disable Server.WriteTimeout when sending a large response
|
|
io.Copy(w, bigData)
|
|
}
|
|
</pre>
|
|
|
|
<h3 id="reverseproxy_rewrite">New ReverseProxy Rewrite hook</h3>
|
|
|
|
<p>
|
|
The <a href="/pkg/net/http/httputil/#ReverseProxy"><code>httputil.ReverseProxy</code></a>
|
|
forwarding proxy includes a new <code>Rewrite</code> hook function, superseding the
|
|
previous <code>Director</code> hook.
|
|
</p>
|
|
|
|
<p>
|
|
The <code>Rewrite</code> hook accepts a
|
|
<a href="/pkg/net/http/httputil/#ProxyRequest"><code>ProxyRequest</code></a> parameter,
|
|
which includes both the inbound request received by the proxy and the outbound
|
|
request that it will send.
|
|
Unlike <code>Director</code> hooks, which only operate on the outbound request,
|
|
this permits <code>Rewrite</code> hooks to avoid certain scenarios where
|
|
a malicious inbound request may cause headers added by the hook
|
|
to be removed before forwarding.
|
|
See <a href="https://go.dev/issue/50580">issue #50580</a>.
|
|
</p>
|
|
|
|
<p>
|
|
The <a href="/pkg/net/http/httputil/#ProxyRequest.SetURL"><code>ProxyRequest.SetURL</code></a>
|
|
method routes the outbound request to a provided destination
|
|
and supersedes the <code>NewSingleHostReverseProxy</code> function.
|
|
Unlike <code>NewSingleHostReverseProxy</code>, <code>SetURL</code>
|
|
also sets the <code>Host</code> header of the outbound request.
|
|
</p>
|
|
|
|
<p>
|
|
The
|
|
<a href="/pkg/net/http/httputil/#ProxyRequest.SetXForwarded"><code>ProxyRequest.SetXForwarded</code></a>
|
|
method sets the <code>X-Forwarded-For</code>, <code>X-Forwarded-Host</code>,
|
|
and <code>X-Forwarded-Proto</code> headers of the outbound request.
|
|
When using a <code>Rewrite</code>, these headers are not added by default.
|
|
</p>
|
|
|
|
<p>
|
|
An example of a <code>Rewrite</code> hook using these features is:
|
|
</p>
|
|
|
|
<pre>
|
|
proxyHandler := &httputil.ReverseProxy{
|
|
Rewrite: func(r *httputil.ProxyRequest) {
|
|
r.SetURL(outboundURL) // Forward request to outboundURL.
|
|
r.SetXForwarded() // Set X-Forwarded-* headers.
|
|
r.Out.Header.Set("X-Additional-Header", "header set by the proxy")
|
|
},
|
|
}
|
|
</pre>
|
|
|
|
<h3 id="minor_library_changes">Minor changes to the library</h3>
|
|
|
|
<p>
|
|
As always, there are various minor changes and updates to the library,
|
|
made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
|
|
in mind.
|
|
There are also various performance improvements, not enumerated here.
|
|
</p>
|
|
|
|
<p>
|
|
TODO: complete this section
|
|
</p>
|
|
|
|
<dl id="archive/zip"><dt><a href="/pkg/archive/zip/">archive/zip</a></dt>
|
|
<dd>
|
|
<p><!-- CL 449955 -->
|
|
Reading from a directory file that contains file data will now return an error.
|
|
The zip specification does not permit directory files to contain file data,
|
|
so this change only affects reading from invalid archives.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- archive/zip -->
|
|
|
|
<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
|
|
<dd>
|
|
<p><!-- CL 407176 -->
|
|
TODO: <a href="https://go.dev/cl/407176">https://go.dev/cl/407176</a>: strings, bytes: add CutPrefix and CutSuffix
|
|
</p>
|
|
|
|
<p><!-- CL 359675 -->
|
|
TODO: <a href="https://go.dev/cl/359675">https://go.dev/cl/359675</a>: bytes: add Clone function
|
|
</p>
|
|
</dd>
|
|
</dl><!-- bytes -->
|
|
|
|
<dl id="context"><dt><a href="/pkg/context/">context</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/51365 --><!-- CL 375977 -->
|
|
TODO: <a href="https://go.dev/cl/375977">https://go.dev/cl/375977</a>: context: add APIs for writing and reading cancelation cause; modified api/next/51365.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- context -->
|
|
|
|
<dl id="crypto/ed25519"><dt><a href="/pkg/crypto/ed25519/">crypto/ed25519</a></dt>
|
|
<dd>
|
|
<p><!-- CL 373076 -->
|
|
TODO: <a href="https://go.dev/cl/373076">https://go.dev/cl/373076</a>: crypto/ed25519: implement Ed25519ph in Sign and VerifyWithOptions; modified api/next/31804.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- crypto/ed25519 -->
|
|
|
|
<dl id="crypto/elliptic"><dt><a href="/pkg/crypto/elliptic/">crypto/elliptic</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/34648 -->
|
|
TODO: <a href="https://go.dev/issue/34648">https://go.dev/issue/34648</a>: automatically upgrade CurveParams for known curves and deprecate custom ones
|
|
</p>
|
|
</dd>
|
|
</dl><!-- crypto/elliptic -->
|
|
|
|
<dl id="crypto/rsa"><dt><a href="/pkg/crypto/rsa/">crypto/rsa</a></dt>
|
|
<dd>
|
|
<p><!-- CL 418874 --><!-- https://go.dev/issue/19974 -->
|
|
TODO: <a href="https://go.dev/issue/19974">https://go.dev/issue/19974</a>: allow hash.Hash for OAEP and MGF1 to be specified independently
|
|
</p>
|
|
</dd>
|
|
</dl><!-- crypto/rsa -->
|
|
|
|
<dl id="crypto/subtle"><dt><a href="/pkg/crypto/subtle/">crypto/subtle</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/53021 -->
|
|
TODO: <a href="https://go.dev/issue/53021">https://go.dev/issue/53021</a>: add XORBytes
|
|
</p>
|
|
|
|
<p><!-- CL 421435 -->
|
|
TODO: <a href="https://go.dev/cl/421435">https://go.dev/cl/421435</a>: crypto/subtle: add XORBytes; modified api/next/53021.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- crypto/subtle -->
|
|
|
|
<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
|
|
<dd>
|
|
<p><!-- CL 426455 -->
|
|
TODO: <a href="https://go.dev/cl/426455">https://go.dev/cl/426455</a>: crypto/tls: use certificate cache in client
|
|
</p>
|
|
</dd>
|
|
</dl><!-- crypto/tls -->
|
|
|
|
<dl id="debug/elf"><dt><a href="/pkg/debug/elf/">debug/elf</a></dt>
|
|
<dd>
|
|
<p><!-- CL 420982 -->
|
|
TODO: <a href="https://go.dev/cl/420982">https://go.dev/cl/420982</a>: debug/elf: add new-style LoongArch reloc types; modified api/next/54222.txt
|
|
</p>
|
|
<p><!-- CL 411915 -->
|
|
TODO: <a href="https://go.dev/cl/411915">https://go.dev/cl/411915</a>: debug/elf: fix reloc number of R_PPC64_SECTOFF_LO_DS; modified api/except.txt, api/next/53356.txt
|
|
</p>
|
|
|
|
<p><!-- CL 425555 -->
|
|
TODO: <a href="https://go.dev/cl/425555">https://go.dev/cl/425555</a>: debug/elf: define additional PPC64 ELFv2 relocations; modified api/next/54345.txt
|
|
</p>
|
|
|
|
<p><!-- CL 429601 -->
|
|
TODO: <a href="https://go.dev/cl/429601">https://go.dev/cl/429601</a>: debug/elf: return error on reading from SHT_NOBITS sections
|
|
</p>
|
|
|
|
<p><!-- CL 435415 -->
|
|
TODO: <a href="https://go.dev/cl/435415">https://go.dev/cl/435415</a>: debug/elf: fix typo in R_PPC64_TPREL34 and R_PPC64_DTPREL34; modified api/next/54345.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- debug/elf -->
|
|
|
|
<dl id="debug/pe"><dt><a href="/pkg/debug/pe/">debug/pe</a></dt>
|
|
<dd>
|
|
<p><!-- CL 421357 -->
|
|
TODO: <a href="https://go.dev/cl/421357">https://go.dev/cl/421357</a>: debug/pe: add IMAGE_FILE_MACHINE_RISCV{32,64,128}; modified api/next/54251.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- debug/pe -->
|
|
|
|
<dl id="encoding/binary"><dt><a href="/pkg/encoding/binary/">encoding/binary</a></dt>
|
|
<dd>
|
|
<p><!-- CL 420274 -->
|
|
The <a href="/pkg/encoding/binary/#ReadVarint"><code>ReadVarint</code></a> and
|
|
<a href="/pkg/encoding/binary/#ReadUvarint"><code>ReadUvarint</code></a>
|
|
functions will now return <code>io.ErrUnexpectedEOF</code> after reading a partial value,
|
|
rather than <code>io.EOF</code>.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- encoding/binary -->
|
|
|
|
<dl id="encoding/xml"><dt><a href="/pkg/encoding/xml/">encoding/xml</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/53346 -->
|
|
TODO: <a href="https://go.dev/issue/53346">https://go.dev/issue/53346</a>: Add (*Encoder).Close() to check for unclosed elements
|
|
</p>
|
|
|
|
<p><!-- CL 424777 -->
|
|
TODO: <a href="https://go.dev/cl/424777">https://go.dev/cl/424777</a>: encoding/xml: add (*Encoder).Close
|
|
</p>
|
|
|
|
<p><!-- CL 103875 -->
|
|
TODO: <a href="https://go.dev/cl/103875">https://go.dev/cl/103875</a>: encoding/xml: error when more than one colon in qualified names
|
|
</p>
|
|
|
|
<p><!-- CL 107255 -->
|
|
TODO: <a href="https://go.dev/cl/107255">https://go.dev/cl/107255</a>: encoding/xml: error when closing tag does not match opening tag
|
|
</p>
|
|
</dd>
|
|
</dl><!-- encoding/xml -->
|
|
|
|
<dl id="errors"><dt><a href="/pkg/errors/">errors</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/53435 -->
|
|
The new <code>Join</code> function returns an error wrapping a list of errors.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- errors -->
|
|
|
|
<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/53435 -->
|
|
The <code>Errorf</code> function supports multiple occurrances of
|
|
the <code>%w</code> format verb.
|
|
</p>
|
|
<p><!-- https://go.dev/issue/51668 -->
|
|
TODO: <a href="https://go.dev/issue/51668">https://go.dev/issue/51668</a>: add FormatString(State) string
|
|
</p>
|
|
|
|
<p><!-- CL 400875 -->
|
|
TODO: <a href="https://go.dev/cl/400875">https://go.dev/cl/400875</a>: fmt: add a function to recover the original format string given a State; modified api/next/51668.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- fmt -->
|
|
|
|
<dl id="go/ast"><dt><a href="/pkg/go/ast/">go/ast</a></dt>
|
|
<dd>
|
|
<p><!-- CL 426091 -->
|
|
TODO: <a href="https://go.dev/cl/426091">https://go.dev/cl/426091</a>: go/ast: add Range token.Pos to RangeStmt
|
|
</p>
|
|
|
|
<p><!-- CL 427955 -->
|
|
TODO: <a href="https://go.dev/cl/427955">https://go.dev/cl/427955</a>: go/ast: record start and end of file in File.File{Start,End}; modified api/next/53202.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- go/ast -->
|
|
|
|
<dl id="go/build"><dt><a href="/pkg/go/build/">go/build</a></dt>
|
|
<dd>
|
|
<p><!-- CL 421434 -->
|
|
TODO: <a href="https://go.dev/cl/421434">https://go.dev/cl/421434</a>: go/build: add GO$GOARCH-based ToolTags
|
|
</p>
|
|
</dd>
|
|
</dl><!-- go/build -->
|
|
|
|
<dl id="go/token"><dt><a href="/pkg/go/token/">go/token</a></dt>
|
|
<dd>
|
|
<p><!-- CL 410114 -->
|
|
TODO: <a href="https://go.dev/cl/410114">https://go.dev/cl/410114</a>: go/token: add (*FileSet).RemoveFile(*File) method
|
|
</p>
|
|
</dd>
|
|
</dl><!-- go/token -->
|
|
|
|
<dl id="io"><dt><a href="/pkg/io/">io</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/45899 -->
|
|
TODO: <a href="https://go.dev/issue/45899">https://go.dev/issue/45899</a>: add OffsetWriter, NewOffsetWriter
|
|
</p>
|
|
|
|
<p><!-- CL 406776 -->
|
|
TODO: <a href="https://go.dev/cl/406776">https://go.dev/cl/406776</a>: io: add OffsetWriter, NewOffsetWriter; modified api/next/45899.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- io -->
|
|
|
|
<dl id="io/fs"><dt><a href="/pkg/io/fs/">io/fs</a></dt>
|
|
<dd>
|
|
<p><!-- CL 363814 -->
|
|
TODO: <a href="https://go.dev/cl/363814">https://go.dev/cl/363814</a>: path/filepath, io/fs: add SkipAll; modified api/next/47209.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- io -->
|
|
|
|
<dl id="math/rand"><dt><a href="/pkg/math/rand/">math/rand</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/54880 -->
|
|
TODO: <a href="https://go.dev/issue/54880">https://go.dev/issue/54880</a>: seed global generator randomly
|
|
</p>
|
|
|
|
<p><!-- CL 436955 -->
|
|
TODO: <a href="https://go.dev/cl/436955">https://go.dev/cl/436955</a>: math/rand: deprecate Read
|
|
</p>
|
|
</dd>
|
|
</dl><!-- math/rand -->
|
|
|
|
<dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/48866 -->
|
|
The <code>ParseMediaType</code> function now allows duplicate parameter names,
|
|
so long as the values of the names are the same.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- mime -->
|
|
|
|
<dl id="mime/multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
|
|
<dd>
|
|
<p><!-- CL 431675 -->
|
|
Methods of the <code>Reader</code> type now wrap errors
|
|
returned by the underlying <code>io.Reader</code>.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- mime/multipart -->
|
|
|
|
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/50101 -->
|
|
TODO: <a href="https://go.dev/issue/50101">https://go.dev/issue/50101</a>: make LookupCNAME consistent between Unix and Windows, document
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/53482 -->
|
|
TODO: <a href="https://go.dev/issue/53482">https://go.dev/issue/53482</a>: add FlagRunning to the Flags of struct Interface, to exactly reflect the states of an interface or NIC
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/55301 -->
|
|
TODO: <a href="https://go.dev/issue/55301">https://go.dev/issue/55301</a>: Add ControlContext to Dialer
|
|
</p>
|
|
|
|
<p><!-- CL 413454 -->
|
|
TODO: <a href="https://go.dev/cl/413454">https://go.dev/cl/413454</a>: net: add FlagRunning to exactly reflect the states of an interface.; modified api/next/53482.txt
|
|
</p>
|
|
|
|
<p><!-- CL 428955 -->
|
|
TODO: <a href="https://go.dev/cl/428955">https://go.dev/cl/428955</a>: net: set AD bit in DNS queries when trust-ad in resolv.conf
|
|
</p>
|
|
|
|
<p><!-- CL 444955 -->
|
|
TODO: <a href="https://go.dev/cl/444955">https://go.dev/cl/444955</a>: net: add ControlContext to Dialer; modified api/next/55301.txt
|
|
</p>
|
|
|
|
<p><!-- CL 446179 -->
|
|
TODO: <a href="https://go.dev/cl/446179">https://go.dev/cl/446179</a>: net: unify CNAME handling across ports
|
|
</p>
|
|
|
|
<p><!-- CL 448075 -->
|
|
TODO: <a href="https://go.dev/cl/448075">https://go.dev/cl/448075</a>: net: auto-reload the /etc/nsswitch.conf on unix systems
|
|
</p>
|
|
</dd>
|
|
</dl><!-- net -->
|
|
|
|
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/541360 -->
|
|
The new <code>ResponseController</code> type provides access to extended per-request
|
|
functionality not handled by the <code>ResponseWriter<code> interface.
|
|
<p>
|
|
|
|
<p>
|
|
The new <code>ResponseController.SetReadDeadline</code> and
|
|
<code>ResponseController.SetWriteDeadline</code> methods permit setting
|
|
per-request read and write deadlines.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/51914 -->
|
|
The <code>ResponseWriter.WriteHeader</code> function now supports sending
|
|
<code>1xx</code> status codes.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/41773 -->
|
|
The new <code>Server.DisableGeneralOptionsHandler</code> configuration setting
|
|
allows disabling the default <code>OPTIONS *</code> handler.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/54299 -->
|
|
The new <code>Transport.OnProxyConnectResponse</code> hook is called
|
|
when a <code>Transport</code> receives an HTTP response from a proxy
|
|
for a <code>CONNECT</code> request.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/53960 -->
|
|
The HTTP server now accepts HEAD requests containing a body,
|
|
rather than rejecting them as invalid.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/53896 -->
|
|
HTTP/2 stream errors returned by <code>net/http</code> functions may be converted
|
|
to a <code>"golang.org/x/net/http2".StreamError</code> using <code>errors.As</code>.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/cl/397734 -->
|
|
Leading and trailing spaces are trimmed from cookie names,
|
|
rather than being rejected as invalid.
|
|
For example, a cookie setting of "name =value"
|
|
is now accepted as setting the cookie "name".
|
|
</p>
|
|
</dd>
|
|
</dl><!-- net/http -->
|
|
|
|
<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/53002 -->
|
|
The new <code>ReverseProxy</code> hook supersedes the existing <code>Rewrite</code> hook.
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/50465 -->
|
|
<code>ReverseProxy</code> now adds
|
|
<code>X-Forwarded-Proto</code> and <code>X-Forwarded-Host</code> headers
|
|
to forwarded requests.
|
|
These headers are added to all requests forwarded by a <code>Director</code> hook,
|
|
and to requests forwarded by a <code>Rewrite</code> hook which calls the
|
|
<code>ProxyRequest.SetXForwarded</code> function.
|
|
</p>
|
|
|
|
<p><!-- CL 407375 -->
|
|
<code>ReverseProxy</code> no longer adds a <code>User-Agent</code> header
|
|
to forwarded requests when the incoming request does not have one.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- net/http/httputil -->
|
|
|
|
<dl id="net/netip"><dt><a href="/pkg/net/netip/">net/netip</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/51766 -->
|
|
TODO: <a href="https://go.dev/issue/51766">https://go.dev/issue/51766</a>: add IPv6LinkLocalAllRouters
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/51777 -->
|
|
TODO: <a href="https://go.dev/issue/51777">https://go.dev/issue/51777</a>: add IPv6Loopback
|
|
</p>
|
|
|
|
<p><!-- CL 412475 -->
|
|
TODO: <a href="https://go.dev/cl/412475">https://go.dev/cl/412475</a>: net/netip: add IPv6LinkLocalAllRouters and IPv6Loopback; modified api/next/51766.txt, api/next/51777.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- net/netip -->
|
|
|
|
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
|
|
<dd>
|
|
<p><!-- CL 448897 -->
|
|
TODO: <a href="https://go.dev/cl/448897">https://go.dev/cl/448897</a>: os: remove special casing of NUL in Windows file operations
|
|
</p>
|
|
</dd>
|
|
</dl><!-- os -->
|
|
|
|
<dl id="os/exec"><dt><a href="/pkg/os/exec/">os/exec</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/50436, CL 401835 -->
|
|
The new <code>Cmd</code> fields <code>Cancel</code> and <code>WaitDelay</code>
|
|
specify the behavior of the <code>Cmd</code> when its associated
|
|
<code>Context</code> is canceled or its process exits with I/O pipes still
|
|
held open by a child process.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- os/exec -->
|
|
|
|
<dl id="path/filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
|
|
<dd>
|
|
<p><!-- CL 363814 --><!-- https://go.dev/issue/47209 -->
|
|
TODO: <a href="https://go.dev/cl/363814">https://go.dev/cl/363814</a>: path/filepath, io/fs: add SkipAll; modified api/next/47209.txt
|
|
</p>
|
|
<p><!-- https://go.dev/issue/56219 -->
|
|
The new <code>IsLocal</code> function reports whether a path is
|
|
lexically local to a directory.
|
|
For example, if <code>IsLocal(p)</code> is <code>true</code>,
|
|
then <code>Open(p)</code> will refer to a file that is lexically
|
|
within the subtree rooted at the current directory.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- io -->
|
|
|
|
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/46746 -->
|
|
TODO: <a href="https://go.dev/issue/46746">https://go.dev/issue/46746</a>: add Value.Equal, Value.Comparable
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/48000 -->
|
|
TODO: <a href="https://go.dev/issue/48000">https://go.dev/issue/48000</a>: add reflect.Value.Grow
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/52376 -->
|
|
TODO: <a href="https://go.dev/issue/52376">https://go.dev/issue/52376</a>: add Value.SetZero
|
|
</p>
|
|
|
|
<p><!-- CL 389635 -->
|
|
TODO: <a href="https://go.dev/cl/389635">https://go.dev/cl/389635</a>: reflect: add Value.Grow
|
|
</p>
|
|
|
|
<p><!-- CL 411476 -->
|
|
TODO: <a href="https://go.dev/cl/411476">https://go.dev/cl/411476</a>: reflect: add Value.SetZero
|
|
</p>
|
|
|
|
<p><!-- CL 423794 -->
|
|
TODO: <a href="https://go.dev/cl/423794">https://go.dev/cl/423794</a>: reflect: add Value.{Comparable,Equal}
|
|
</p>
|
|
|
|
<p><!-- CL 425184 -->
|
|
TODO: <a href="https://go.dev/cl/425184">https://go.dev/cl/425184</a>: reflect: fix Value.SetIterXXX to check for the read-only bit
|
|
</p>
|
|
|
|
<p><!-- CL 428757 -->
|
|
TODO: <a href="https://go.dev/cl/428757">https://go.dev/cl/428757</a>: reflect: deprecate SliceHeader and StringHeader
|
|
</p>
|
|
</dd>
|
|
</dl><!-- reflect -->
|
|
|
|
<dl id="regexp"><dt><a href="/pkg/regexp/">regexp</a></dt>
|
|
<dd>
|
|
<p><!-- CL 444817 -->
|
|
TODO: <a href="https://go.dev/cl/444817">https://go.dev/cl/444817</a>: regexp: add ErrLarge error; modified api/next/56041.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- regexp -->
|
|
|
|
<dl id="runtime/metrics"><dt><a href="/pkg/runtime/metrics/">runtime/metrics</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/47216 -->
|
|
TODO: <a href="https://go.dev/issue/47216">https://go.dev/issue/47216</a>: add GOMAXPROCS, NumCgoCall, GC CPU time
|
|
</p>
|
|
</dd>
|
|
</dl><!-- runtime/metrics -->
|
|
|
|
<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
|
|
<dd>
|
|
<p><!-- CL 345488 -->
|
|
TODO: <a href="https://go.dev/cl/345488">https://go.dev/cl/345488</a>: strconv: optimize Parse for []byte arguments
|
|
</p>
|
|
</dd>
|
|
</dl><!-- strconv -->
|
|
|
|
<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/42537 -->
|
|
TODO: <a href="https://go.dev/issue/42537">https://go.dev/issue/42537</a>: add CutPrefix and CutSuffix
|
|
</p>
|
|
|
|
<p><!-- https://go.dev/issue/45038 -->
|
|
TODO: <a href="https://go.dev/issue/45038">https://go.dev/issue/45038</a>: bytes, strings: add Clone
|
|
</p>
|
|
</dd>
|
|
</dl><!-- strings -->
|
|
|
|
<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
|
|
<dd>
|
|
<p><!-- CL 399094, https://go.dev/issue/51972 -->
|
|
The new methods <a href="/pkg/sync/#Map.Swap"><code>Map.Swap</code></a>,
|
|
<a href="/pkg/sync/#Map.CompareAndSwap"><code>Map.CompareAndSwap</code></a>, and
|
|
<a href="/pkg/sync/#Map.CompareAndDelete"><code>Map.CompareAndDelete</code></a>
|
|
allow existing map entries to be updated atomically.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- sync -->
|
|
|
|
<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
|
|
<dd>
|
|
<p><!-- CL 407574 -->
|
|
TODO: <a href="https://go.dev/cl/407574">https://go.dev/cl/407574</a>: syscall: add new CLONE_ flags for Linux
|
|
</p>
|
|
|
|
<p><!-- CL 411596 -->
|
|
TODO: <a href="https://go.dev/cl/411596">https://go.dev/cl/411596</a>: syscall: remove FreeBSD 11 and below 64bit inode compatibility shims
|
|
</p>
|
|
|
|
<p><!-- CL 417695 -->
|
|
TODO: <a href="https://go.dev/cl/417695">https://go.dev/cl/417695</a>: syscall: add CgroupFD support for ForkExec on Linux
|
|
</p>
|
|
</dd>
|
|
</dl><!-- syscall -->
|
|
|
|
<dl id="testing"><dt><a href="/pkg/testing/">testing</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/43620, CL 420254 -->
|
|
The new method <a href="/pkg/testing/#B.Elapsed"><code>B.Elapsed</code></a>
|
|
reports the current elapsed time of the benchmark, which may be useful for
|
|
calculating rates to report with <code>ReportMetric</code>.
|
|
</p>
|
|
</dd>
|
|
</dl><!-- testing -->
|
|
|
|
<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/52746 -->
|
|
TODO: <a href="https://go.dev/issue/52746">https://go.dev/issue/52746</a>: add DateTime, DateOnly, TimeOnly format constants
|
|
</p>
|
|
|
|
<p><!-- CL 412495 -->
|
|
TODO: <a href="https://go.dev/cl/412495">https://go.dev/cl/412495</a>: time: add DateTime, DateOnly, and TimeOnly
|
|
</p>
|
|
|
|
<p><!-- CL 382734 --><!-- https://go.dev/issue/50770 -->
|
|
TODO: <a href="https://go.dev/cl/382734">https://go.dev/cl/382734</a>: time: implement Compare method
|
|
</p>
|
|
|
|
<p><!-- CL 425037 -->
|
|
TODO: <a href="https://go.dev/cl/425037">https://go.dev/cl/425037</a>: time: fix Parse to ignore extra sub-nanosecond digits
|
|
</p>
|
|
|
|
<p><!-- CL 444277 -->
|
|
TODO: <a href="https://go.dev/cl/444277">https://go.dev/cl/444277</a>: time: implement strict RFC 3339 during marshal and unmarshal
|
|
</p>
|
|
</dd>
|
|
</dl><!-- time -->
|
|
|
|
<dl id="unicode/utf16"><dt><a href="/pkg/unicode/utf16/">unicode/utf16</a></dt>
|
|
<dd>
|
|
<p><!-- https://go.dev/issue/51896 -->
|
|
TODO: <a href="https://go.dev/issue/51896">https://go.dev/issue/51896</a>: add AppendRune
|
|
</p>
|
|
|
|
<p><!-- CL 409054 -->
|
|
TODO: <a href="https://go.dev/cl/409054">https://go.dev/cl/409054</a>: unicode/utf16: add AppendRune; modified api/next/51896.txt
|
|
</p>
|
|
</dd>
|
|
</dl><!-- unicode/utf16 -->
|
|
|
|
<!-- Silence false positives from x/build/cmd/relnote: -->
|
|
<!-- https://go.dev/issue/45964 was documented in Go 1.18 release notes but closed recently -->
|
|
<!-- https://go.dev/issue/52114 is an accepted proposal to add golang.org/x/net/http2.Transport.DialTLSContext; it's not a part of the Go release -->
|
|
<!-- CL 431335: cmd/api: make check pickier about api/*.txt; modified api/next/42537.txt, api/next/43620.txt, api/next/45899.txt, api/next/46746.txt, api/next/50429.txt, api/next/51896.txt, api/next/53482.txt -->
|
|
<!-- CL 447896 api: add newline to 55301.txt; modified api/next/55301.txt -->
|
|
<!-- CL 449215 api/next/54299: add missing newline; modified api/next/54299.txt -->
|
|
<!-- CL 433057 cmd: update vendored golang.org/x/tools for multiple error wrapping -->
|
|
<!-- CL 423362 crypto/internal/boring: update to newer boringcrypto, add arm64 -->
|
|
<!-- https://go.dev/issue/53481 x/cryptobyte ReadUint64, AddUint64 -->
|
|
<!-- https://go.dev/issue/51994 x/crypto/ssh -->
|
|
<!-- https://go.dev/issue/55358 x/exp/slices -->
|
|
<!-- https://go.dev/issue/54714 x/sys/unix -->
|
|
<!-- https://go.dev/issue/50035 https://go.dev/issue/54237 x/time/rate -->
|
|
<!-- CL 421879: cmd/cgo: add and use runtime/cgo.Incomplete instead of //go:notinheap -->
|
|
<!-- https://go.dev/issue/46731: replace `//go:notinheap` with runtime/internal/sys.NotInHeap -->
|