From 76ec47eeec0e61bd5c679412ec847cdfaf1a95bb Mon Sep 17 00:00:00 2001
From: Russ Cox
+
The directory
+
The
+
The
+
The
+
The vet tool now reports use of the time format 2006-02-01 (yyyy-dd-mm)
with
- TODO: https://go.dev/issue/49390: clarify whether "-l" and "-N" compiler flags are actually supported
+
+ TODO: complete this section, or delete if not needed
- TODO: complete this section
+
+ Go 1.20 adds a new
+ Programs should prefer to use
+
The new
+
The Go command
-$GOROOT/pkg
no longer stores
pre-compiled package archives for the standard library:
go
install
no longer writes them,
@@ -101,7 +101,7 @@ Do not send CLs removing the interior tags from such phrases.
the packages named on the command line.
go
command now defines
architecture feature build tags, such as amd64.v2
,
to allow selecting a package implementation file based on the presence
@@ -156,7 +156,7 @@ Do not send CLs removing the interior tags from such phrases.
Cgo
-go
command now disables cgo
by default
on systems without a C toolchain.
More specifically, when the CGO_ENABLED
environment variable is unset,
@@ -205,7 +205,7 @@ Do not send CLs removing the interior tags from such phrases.
Improved detection of loop variable capture by nested functions
-vet
tool now reports references to loop variables following
a call to T.Parallel()
within subtest function bodies. Such references may observe the value of the
@@ -221,7 +221,7 @@ Do not send CLs removing the interior tags from such phrases.
New diagnostic for incorrect time formats
-Time.Format
and
time.Parse
.
@@ -238,8 +238,8 @@ Do not send CLs removing the interior tags from such phrases.
Compiler
-Linker
@@ -266,10 +266,17 @@ Do not send CLs removing the interior tags from such phrases.
Core library
-New
+crypto/ecdh
packageNew crypto/ecdh package
-crypto/ecdh
package
+ to provide direct support for Elliptic Curve Diffie-Hellman key exchange
+ over NIST curves and Curve25519.
+crypto/ecdh
+ or crypto/ecdsa
+ instead of the lower-level functionality in crypto/elliptic
.
Wrapping multiple errors
@@ -299,7 +306,7 @@ Do not send CLs removing the interior tags from such phrases.
HTTP ResponseController
-"net/http".ResponseController
type provides access to extended per-request functionality not handled by the
@@ -330,9 +337,11 @@ func RequestHandler(w ResponseWriter, r *Request) {
New ReverseProxy Rewrite hook
-httputil.ReverseProxy
- forwarding proxy includes a new Rewrite
hook function, superseding the
+ forwarding proxy includes a new
+ Rewrite
+ hook function, superseding the
previous Director
hook.
Host
header of the outbound request.
+
The
ProxyRequest.SetXForwarded
method sets the X-Forwarded-For
, X-Forwarded-Host
,
@@ -398,7 +407,7 @@ proxyHandler := &httputil.ReverseProxy{
+
When the GODEBUG=tarinsecurepath=0
environment variable is set,
Reader.Next
method
will now return the error ErrInsecurePath
@@ -440,7 +449,7 @@ proxyHandler := &httputil.ReverseProxy{
but also report whether the string was trimmed.
+
The new Clone
function
allocates a copy of a byte slice.
- TODO: https://go.dev/cl/375977: context: add APIs for writing and reading cancelation cause; modified api/next/51365.txt +
+ The new WithCancelCause
function
+ provides a way to cancel a context with a given error.
+ That error can be retrieved by calling the new Cause
function.
+ The new PrivateKey.ECDH
method
+ converts an ecdsa.PrivateKey
to an ecdh.PrivateKey
.
+
- TODO: https://go.dev/cl/373076: crypto/ed25519: implement Ed25519ph in Sign and VerifyWithOptions; modified api/next/31804.txt +
+ The PrivateKey.Sign
method
+ and the
+ VerifyWithOptions
function
+ now support signing pre-hashed messages with Ed25519ph,
+ indicated by an
+ Options.HashFunc
+ that returns
+ crypto.SHA512
.
+ They also now support Ed25519ctx and Ed25519ph with context,
+ indicated by setting the new
+ Options.Context
+ field.
- TODO: https://go.dev/issue/34648: automatically upgrade CurveParams for known curves and deprecate custom ones
+ Use of custom Curve
implementations
+ not provided by this package (that is, curves other than
+ P224
,
+ P256
,
+ P384
, and
+ P521
)
+ is deprecated.
- TODO: https://go.dev/issue/19974: allow hash.Hash for OAEP and MGF1 to be specified independently +
+ The new field OAEPOptions.MGFHash + allows configuring the MGF1 hash separately for OAEP encryption.
- TODO: https://go.dev/issue/53021: add XORBytes -
- -- TODO: https://go.dev/cl/421435: crypto/subtle: add XORBytes; modified api/next/53021.txt +
+ The new function XORBytes + XORs two byte slices together.
- TODO: https://go.dev/cl/426455: crypto/tls: use certificate cache in client + The TLS client now shares parsed certificates across all clients actively using that certificate. + The savings can be significant in programs that make many concurrent connections to a + server or collection of servers sharing any part of their certificate chains. +
+ +
+ For a handshake failure due to a certificate verification failure,
+ the TLS client and server now return an error of the new type
+ CertificateVerificationError
,
+ which includes the presented certificates.
- TODO: https://go.dev/cl/420982: debug/elf: add new-style LoongArch reloc types; modified api/next/54222.txt -
-- TODO: https://go.dev/cl/411915: debug/elf: fix reloc number of R_PPC64_SECTOFF_LO_DS; modified api/except.txt, api/next/53356.txt -
- -- TODO: https://go.dev/cl/425555: debug/elf: define additional PPC64 ELFv2 relocations; modified api/next/54345.txt +
+ CreateCertificateRequest
+ and
+ MarshalPKCS8PrivateKey
+ now support keys of type *crypto/ecdh.PrivateKey
.
+ CreateCertificate
+ and
+ MarshalPKIXPublicKey
+ now support keys of type *crypto/ecdh.PublicKey
.
+ X.509 unmarshaling continues to unmarshal elliptic curve keys into
+ *ecdsa.PublicKey
and *ecdsa.PrivateKey
.
+ Use their new ECDH
methods to convert to the crypto/ecdh
form.
+
+ The new SetFallbackRoots
+ function allows a program to define a set of fallback root certificates in case the
+ operating system verifier or standard platform root bundle is unavailable at runtime.
+ It will most commonly be used with the new TODO LINK TO x/crypto PACKAGE ONCE IT EXISTS.
- TODO: https://go.dev/cl/429601: debug/elf: return error on reading from SHT_NOBITS sections
+ Attempts to read from a SHT_NOBITS
section using
+ Section.Data
+ or the reader returned by Section.Open
+ now return an error.
- TODO: https://go.dev/cl/435415: debug/elf: fix typo in R_PPC64_TPREL34 and R_PPC64_DTPREL34; modified api/next/54345.txt +
+ Additional R_LARCH_*
constants are defined for use with LoongArch systems.
+
+ Additional R_PPC64_*
constants are defined for use with PPC64 ELFv2 relocations.
+
+ The constant value for R_PPC64_SECTOFF_LO_DS
is corrected, from 61 to 62.
- TODO: https://go.dev/cl/421357: debug/pe: add IMAGE_FILE_MACHINE_RISCV{32,64,128}; modified api/next/54251.txt
+ Additional IMAGE_FILE_MACHINE_RISCV*
constants are defined for use with RISC-V systems.
+
The new Encoder.Close
method
can be used to check for unclosed elements when finished encoding.
+
The decoder now rejects element and attribute names with more than one colon,
such as <a:b:c>
,
as well as namespaces that resolve to an empty string, such as xmlns:a=""
.
@@ -575,7 +640,7 @@ proxyHandler := &httputil.ReverseProxy{
The Errorf
function supports multiple occurrences of
the %w
format verb, returning an error that unwraps to the list of all arguments to %w
.
+
The new FormatString
function recovers the
formatting directive corresponding to a State
,
which can be useful in Formatter
.
@@ -586,27 +651,32 @@ proxyHandler := &httputil.ReverseProxy{
- TODO: https://go.dev/cl/426091: go/ast: add Range token.Pos to RangeStmt +
+ The new RangeStmt.Range
field
+ records the position of the range
keyword in a range statement.
- TODO: https://go.dev/cl/427955: go/ast: record start and end of file in File.File{Start,End}; modified api/next/53202.txt +
+ The new File.FileStart
+ and File.FileEnd
fields
+ record the position of the start and end of the entire source file.
- TODO: https://go.dev/cl/410114: go/token: add (*FileSet).RemoveFile(*File) method +
+ The new FileSet.RemoveFile
method
+ removes a file from a FileSet
.
+ Long-running programs can use this to release memory associated
+ with files they no longer need.
+
The new OffsetWriter
wraps an underlying
WriterAt
and provides Seek
, Write
, and WriteAt
methods
@@ -617,7 +687,7 @@ proxyHandler := &httputil.ReverseProxy{
+
The new error SkipAll
terminates a WalkDir
immediately but successfully.
@@ -627,7 +697,7 @@ proxyHandler := &httputil.ReverseProxy{
+
The math/rand package now automatically seeds
the global random number generator
(used by top-level functions like Float64
and Int
) with a random value,
@@ -639,6 +709,10 @@ proxyHandler := &httputil.ReverseProxy{
Programs that need the earlier consistent global seeding behavior can set
GODEBUG=randautoseed=0
in their environment.
+ The top-level Read
function has been deprecated.
+ In almost all cases, crypto/rand.Read
is more appropriate.
+
+
The LookupCNAME
function now consistently returns the contents
of a CNAME
record when one exists. Previously on Unix systems and
@@ -674,14 +748,14 @@ proxyHandler := &httputil.ReverseProxy{
CNAME
exists.
+
Interface.Flags
now includes the new flag FlagRunning
,
indicating an operationally active interface. An interface which is administratively
configured but not active (for example, because the network cable is not connected)
will have FlagUp
set but not FlagRunning
.
+
The new Dialer.ControlContext
field contains a callback function
similar to the existing Dialer.Control
hook, that additionally
accepts the dial context as a parameter.
@@ -706,34 +780,23 @@ proxyHandler := &httputil.ReverseProxy{
- The new ResponseController
type provides access to extended per-request
- functionality not handled by the ResponseWriter
interface.
-
- -
- The new ResponseController.SetReadDeadline
and
- ResponseController.SetWriteDeadline
methods permit setting
- per-request read and write deadlines.
-
The ResponseWriter.WriteHeader
function now supports sending
1xx
status codes.
+
The new Server.DisableGeneralOptionsHandler
configuration setting
allows disabling the default OPTIONS *
handler.
+
The new Transport.OnProxyConnectResponse
hook is called
when a Transport
receives an HTTP response from a proxy
for a CONNECT
request.
+
The HTTP server now accepts HEAD requests containing a body, rather than rejecting them as invalid.
@@ -755,7 +818,7 @@ proxyHandler := &httputil.ReverseProxy{+
The new IPv6LinkLocalAllRouters
and IPv6Loopback functions
are the net/netip
equivalents of
@@ -768,7 +831,9 @@ proxyHandler := &httputil.ReverseProxy{
- TODO: https://go.dev/cl/448897: os: remove special casing of NUL in Windows file operations
+ On Windows, the name NUL
is no longer treated as a special case in
+ Mkdir
and
+ Stat
.
On Windows, File.Stat
@@ -801,12 +866,12 @@ proxyHandler := &httputil.ReverseProxy{
+
The new error SkipAll
terminates a Walk
immediately but successfully.
+
The new IsLocal
function reports whether a path is
lexically local to a directory.
For example, if IsLocal(p)
is true
,
@@ -818,19 +883,19 @@ proxyHandler := &httputil.ReverseProxy{
+
The new Value.Comparable
and
Value.Equal
methods
can be used to compare two Value
s for equality.
Comparable
reports whether Equal
is a valid operation for a given Value
receiver.
+
The new Value.Grow
method
extends a slice to guarantee space for another n
elements.
+
The new Value.SetZero
method
sets a value to be the zero value for its type.
- TODO: https://go.dev/issue/47216: add GOMAXPROCS, NumCgoCall, GC CPU time
+ Go 1.20 adds new supported metrics,
+ including the current GOMAXPROCS
setting (/sched/gomaxprocs:threads
),
+ the number of cgo calls executed (/cgo/go-to-c-calls:calls
),
+ and various measures of time spent in garbage collection.
+
The new
CutPrefix
and
CutSuffix
functions
@@ -877,7 +945,7 @@ proxyHandler := &httputil.ReverseProxy{
but also report whether the string was trimmed.
+
The new Clone
function
allocates a copy of a string.
- TODO: https://go.dev/cl/407574: syscall: add new CLONE_ flags for Linux -
-- TODO: https://go.dev/cl/411596: syscall: remove FreeBSD 11 and below 64bit inode compatibility shims + On FreeBSD, compatibility shims needed for FreeBSD 11 and earlier have been removed. +
+
+ On Linux, additional CLONE_*
constants
+ are defined for use with the SysProcAttr.Cloneflags
field.
- TODO: https://go.dev/cl/417695: syscall: add CgroupFD support for ForkExec on Linux
+ On Linux, the new SysProcAttr.CgroupFD
+ and SysProcAttr.UseCgroupFD
fields
+ provide a way to place a child process into a specific cgroup.
+
The new time layout constants DateTime
,
DateOnly
, and
TimeOnly
provide names for three of the most common layout strings used in a survey of public Go source code.
+
The new Time.Compare
method
compares two times.
+
The new AppendRune
function appends the UTF-16 encoding of a given rune to a uint16 slice,
analogous to utf8.AppendRune
.
@@ -962,7 +1031,7 @@ proxyHandler := &httputil.ReverseProxy{
-
+
@@ -976,3 +1045,9 @@ proxyHandler := &httputil.ReverseProxy{
+
+
+
+
+
+
--
2.50.0