mirror of
https://github.com/golang/go.git
synced 2026-02-04 01:45:06 +03:00
Compare commits
5 Commits
dev.corety
...
go1.23rc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dff7439dc | ||
|
|
62c3a6350b | ||
|
|
eba9e08766 | ||
|
|
f3bdcda88a | ||
|
|
362f22d2d2 |
@@ -1,7 +1,7 @@
|
||||
name: Language Change Proposals
|
||||
description: Changes to the language
|
||||
labels: ["Proposal", "LanguageChange", "LanguageChangeReview"]
|
||||
title: "proposal: spec: proposal title"
|
||||
labels: ["Proposal", "v2", "LanguageChange"]
|
||||
title: "proposal: Go 2: proposal title"
|
||||
|
||||
|
||||
body:
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -37,7 +37,7 @@ _testmain.go
|
||||
/src/go/build/zcgo.go
|
||||
/src/go/doc/headscan
|
||||
/src/internal/buildcfg/zbootstrap.go
|
||||
/src/internal/runtime/sys/zversion.go
|
||||
/src/runtime/internal/sys/zversion.go
|
||||
/src/unicode/maketables
|
||||
/src/time/tzdata/zzipdata.go
|
||||
/test.out
|
||||
|
||||
4
LICENSE
4
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright 2009 The Go Authors.
|
||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google LLC nor the names of its
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Go is an open source programming language that makes it easy to build simple,
|
||||
reliable, and efficient software.
|
||||
|
||||

|
||||
*Gopher image by [Renee French][rf], licensed under [Creative Commons 4.0 Attribution license][cc4-by].*
|
||||
*Gopher image by [Renee French][rf], licensed under [Creative Commons 4.0 Attributions license][cc4-by].*
|
||||
|
||||
Our canonical Git repository is located at https://go.googlesource.com/go.
|
||||
There is a mirror of the repository at https://github.com/golang/go.
|
||||
|
||||
@@ -18,7 +18,7 @@ pkg crypto/tls, type Config struct, EncryptedClientHelloRejectionVerify func(Con
|
||||
pkg crypto/tls, type ConnectionState struct, ECHAccepted bool #63369
|
||||
pkg crypto/tls, type ECHRejectionError struct #63369
|
||||
pkg crypto/tls, type ECHRejectionError struct, RetryConfigList []uint8 #63369
|
||||
pkg crypto/tls, type QUICConfig struct, EnableSessionEvents bool #63691
|
||||
pkg crypto/tls, type QUICConfig struct, EnableStoreSessionEvent bool #63691
|
||||
pkg crypto/tls, type QUICEvent struct, SessionState *SessionState #63691
|
||||
pkg crypto/tls, type QUICSessionTicketOptions struct, Extra [][]uint8 #63691
|
||||
pkg crypto/x509, func ParseOID(string) (OID, error) #66249
|
||||
|
||||
230
api/go1.24.txt
230
api/go1.24.txt
@@ -1,230 +0,0 @@
|
||||
pkg bytes, func FieldsFuncSeq([]uint8, func(int32) bool) iter.Seq[[]uint8] #61901
|
||||
pkg bytes, func FieldsSeq([]uint8) iter.Seq[[]uint8] #61901
|
||||
pkg bytes, func Lines([]uint8) iter.Seq[[]uint8] #61901
|
||||
pkg bytes, func SplitAfterSeq([]uint8, []uint8) iter.Seq[[]uint8] #61901
|
||||
pkg bytes, func SplitSeq([]uint8, []uint8) iter.Seq[[]uint8] #61901
|
||||
pkg crypto/cipher, func NewCFBDecrypter //deprecated #69445
|
||||
pkg crypto/cipher, func NewCFBEncrypter //deprecated #69445
|
||||
pkg crypto/cipher, func NewGCMWithRandomNonce(Block) (AEAD, error) #69981
|
||||
pkg crypto/cipher, func NewOFB //deprecated #69445
|
||||
pkg crypto/fips140, func Enabled() bool #70123
|
||||
pkg crypto/hkdf, func Expand[$0 hash.Hash](func() $0, []uint8, string, int) ([]uint8, error) #61477
|
||||
pkg crypto/hkdf, func Extract[$0 hash.Hash](func() $0, []uint8, []uint8) ([]uint8, error) #61477
|
||||
pkg crypto/hkdf, func Key[$0 hash.Hash](func() $0, []uint8, []uint8, string, int) ([]uint8, error) #61477
|
||||
pkg crypto/mlkem, const CiphertextSize1024 = 1568 #70122
|
||||
pkg crypto/mlkem, const CiphertextSize1024 ideal-int #70122
|
||||
pkg crypto/mlkem, const CiphertextSize768 = 1088 #70122
|
||||
pkg crypto/mlkem, const CiphertextSize768 ideal-int #70122
|
||||
pkg crypto/mlkem, const EncapsulationKeySize1024 = 1568 #70122
|
||||
pkg crypto/mlkem, const EncapsulationKeySize1024 ideal-int #70122
|
||||
pkg crypto/mlkem, const EncapsulationKeySize768 = 1184 #70122
|
||||
pkg crypto/mlkem, const EncapsulationKeySize768 ideal-int #70122
|
||||
pkg crypto/mlkem, const SeedSize = 64 #70122
|
||||
pkg crypto/mlkem, const SeedSize ideal-int #70122
|
||||
pkg crypto/mlkem, const SharedKeySize = 32 #70122
|
||||
pkg crypto/mlkem, const SharedKeySize ideal-int #70122
|
||||
pkg crypto/mlkem, func GenerateKey1024() (*DecapsulationKey1024, error) #70122
|
||||
pkg crypto/mlkem, func GenerateKey768() (*DecapsulationKey768, error) #70122
|
||||
pkg crypto/mlkem, func NewDecapsulationKey1024([]uint8) (*DecapsulationKey1024, error) #70122
|
||||
pkg crypto/mlkem, func NewDecapsulationKey768([]uint8) (*DecapsulationKey768, error) #70122
|
||||
pkg crypto/mlkem, func NewEncapsulationKey1024([]uint8) (*EncapsulationKey1024, error) #70122
|
||||
pkg crypto/mlkem, func NewEncapsulationKey768([]uint8) (*EncapsulationKey768, error) #70122
|
||||
pkg crypto/mlkem, method (*DecapsulationKey1024) Bytes() []uint8 #70122
|
||||
pkg crypto/mlkem, method (*DecapsulationKey1024) Decapsulate([]uint8) ([]uint8, error) #70122
|
||||
pkg crypto/mlkem, method (*DecapsulationKey1024) EncapsulationKey() *EncapsulationKey1024 #70122
|
||||
pkg crypto/mlkem, method (*DecapsulationKey768) Bytes() []uint8 #70122
|
||||
pkg crypto/mlkem, method (*DecapsulationKey768) Decapsulate([]uint8) ([]uint8, error) #70122
|
||||
pkg crypto/mlkem, method (*DecapsulationKey768) EncapsulationKey() *EncapsulationKey768 #70122
|
||||
pkg crypto/mlkem, method (*EncapsulationKey1024) Bytes() []uint8 #70122
|
||||
pkg crypto/mlkem, method (*EncapsulationKey1024) Encapsulate() ([]uint8, []uint8) #70122
|
||||
pkg crypto/mlkem, method (*EncapsulationKey768) Bytes() []uint8 #70122
|
||||
pkg crypto/mlkem, method (*EncapsulationKey768) Encapsulate() ([]uint8, []uint8) #70122
|
||||
pkg crypto/mlkem, type DecapsulationKey1024 struct #70122
|
||||
pkg crypto/mlkem, type DecapsulationKey768 struct #70122
|
||||
pkg crypto/mlkem, type EncapsulationKey1024 struct #70122
|
||||
pkg crypto/mlkem, type EncapsulationKey768 struct #70122
|
||||
pkg crypto/pbkdf2, func Key[$0 hash.Hash](func() $0, string, []uint8, int, int) ([]uint8, error) #69488
|
||||
pkg crypto/rand, func Text() string #67057
|
||||
pkg crypto/sha3, func New224() *SHA3 #69982
|
||||
pkg crypto/sha3, func New256() *SHA3 #69982
|
||||
pkg crypto/sha3, func New384() *SHA3 #69982
|
||||
pkg crypto/sha3, func New512() *SHA3 #69982
|
||||
pkg crypto/sha3, func NewCSHAKE128([]uint8, []uint8) *SHAKE #69982
|
||||
pkg crypto/sha3, func NewCSHAKE256([]uint8, []uint8) *SHAKE #69982
|
||||
pkg crypto/sha3, func NewSHAKE128() *SHAKE #69982
|
||||
pkg crypto/sha3, func NewSHAKE256() *SHAKE #69982
|
||||
pkg crypto/sha3, func Sum224([]uint8) [28]uint8 #69982
|
||||
pkg crypto/sha3, func Sum256([]uint8) [32]uint8 #69982
|
||||
pkg crypto/sha3, func Sum384([]uint8) [48]uint8 #69982
|
||||
pkg crypto/sha3, func Sum512([]uint8) [64]uint8 #69982
|
||||
pkg crypto/sha3, func SumSHAKE128([]uint8, int) []uint8 #69982
|
||||
pkg crypto/sha3, func SumSHAKE256([]uint8, int) []uint8 #69982
|
||||
pkg crypto/sha3, method (*SHA3) AppendBinary([]uint8) ([]uint8, error) #69982
|
||||
pkg crypto/sha3, method (*SHA3) BlockSize() int #69982
|
||||
pkg crypto/sha3, method (*SHA3) MarshalBinary() ([]uint8, error) #69982
|
||||
pkg crypto/sha3, method (*SHA3) Reset() #69982
|
||||
pkg crypto/sha3, method (*SHA3) Size() int #69982
|
||||
pkg crypto/sha3, method (*SHA3) Sum([]uint8) []uint8 #69982
|
||||
pkg crypto/sha3, method (*SHA3) UnmarshalBinary([]uint8) error #69982
|
||||
pkg crypto/sha3, method (*SHA3) Write([]uint8) (int, error) #69982
|
||||
pkg crypto/sha3, method (*SHAKE) AppendBinary([]uint8) ([]uint8, error) #69982
|
||||
pkg crypto/sha3, method (*SHAKE) BlockSize() int #69982
|
||||
pkg crypto/sha3, method (*SHAKE) MarshalBinary() ([]uint8, error) #69982
|
||||
pkg crypto/sha3, method (*SHAKE) Read([]uint8) (int, error) #69982
|
||||
pkg crypto/sha3, method (*SHAKE) Reset() #69982
|
||||
pkg crypto/sha3, method (*SHAKE) UnmarshalBinary([]uint8) error #69982
|
||||
pkg crypto/sha3, method (*SHAKE) Write([]uint8) (int, error) #69982
|
||||
pkg crypto/sha3, type SHA3 struct #69982
|
||||
pkg crypto/sha3, type SHAKE struct #69982
|
||||
pkg crypto/subtle, func WithDataIndependentTiming(func()) #66450
|
||||
pkg crypto/tls, const X25519MLKEM768 = 4588 #69985
|
||||
pkg crypto/tls, const X25519MLKEM768 CurveID #69985
|
||||
pkg crypto/tls, type ClientHelloInfo struct, Extensions []uint16 #32936
|
||||
pkg crypto/tls, type Config struct, EncryptedClientHelloKeys []EncryptedClientHelloKey #68500
|
||||
pkg crypto/tls, type EncryptedClientHelloKey struct #68500
|
||||
pkg crypto/tls, type EncryptedClientHelloKey struct, Config []uint8 #68500
|
||||
pkg crypto/tls, type EncryptedClientHelloKey struct, PrivateKey []uint8 #68500
|
||||
pkg crypto/tls, type EncryptedClientHelloKey struct, SendAsRetry bool #68500
|
||||
pkg crypto/x509, const NoValidChains = 10 #68484
|
||||
pkg crypto/x509, const NoValidChains InvalidReason #68484
|
||||
pkg crypto/x509, method (OID) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg crypto/x509, method (OID) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg crypto/x509, type Certificate struct, InhibitAnyPolicy int #68484
|
||||
pkg crypto/x509, type Certificate struct, InhibitAnyPolicyZero bool #68484
|
||||
pkg crypto/x509, type Certificate struct, InhibitPolicyMapping int #68484
|
||||
pkg crypto/x509, type Certificate struct, InhibitPolicyMappingZero bool #68484
|
||||
pkg crypto/x509, type Certificate struct, PolicyMappings []PolicyMapping #68484
|
||||
pkg crypto/x509, type Certificate struct, RequireExplicitPolicy int #68484
|
||||
pkg crypto/x509, type Certificate struct, RequireExplicitPolicyZero bool #68484
|
||||
pkg crypto/x509, type PolicyMapping struct #68484
|
||||
pkg crypto/x509, type PolicyMapping struct, IssuerDomainPolicy OID #68484
|
||||
pkg crypto/x509, type PolicyMapping struct, SubjectDomainPolicy OID #68484
|
||||
pkg crypto/x509, type VerifyOptions struct, CertificatePolicies []OID #68484
|
||||
pkg debug/elf, const VER_FLG_BASE = 1 #63952
|
||||
pkg debug/elf, const VER_FLG_BASE DynamicVersionFlag #63952
|
||||
pkg debug/elf, const VER_FLG_INFO = 4 #63952
|
||||
pkg debug/elf, const VER_FLG_INFO DynamicVersionFlag #63952
|
||||
pkg debug/elf, const VER_FLG_WEAK = 2 #63952
|
||||
pkg debug/elf, const VER_FLG_WEAK DynamicVersionFlag #63952
|
||||
pkg debug/elf, const VerFlagGlobal = 2 #63952
|
||||
pkg debug/elf, const VerFlagGlobal SymbolVersionFlag #63952
|
||||
pkg debug/elf, const VerFlagHidden = 4 #63952
|
||||
pkg debug/elf, const VerFlagHidden SymbolVersionFlag #63952
|
||||
pkg debug/elf, const VerFlagLocal = 1 #63952
|
||||
pkg debug/elf, const VerFlagLocal SymbolVersionFlag #63952
|
||||
pkg debug/elf, const VerFlagNone = 0 #63952
|
||||
pkg debug/elf, const VerFlagNone SymbolVersionFlag #63952
|
||||
pkg debug/elf, method (*File) DynamicVersionNeeds() ([]DynamicVersionNeed, error) #63952
|
||||
pkg debug/elf, method (*File) DynamicVersions() ([]DynamicVersion, error) #63952
|
||||
pkg debug/elf, type DynamicVersion struct #63952
|
||||
pkg debug/elf, type DynamicVersion struct, Deps []string #63952
|
||||
pkg debug/elf, type DynamicVersion struct, Flags DynamicVersionFlag #63952
|
||||
pkg debug/elf, type DynamicVersion struct, Index uint16 #63952
|
||||
pkg debug/elf, type DynamicVersion struct, Version uint16 #63952
|
||||
pkg debug/elf, type DynamicVersionDep struct #63952
|
||||
pkg debug/elf, type DynamicVersionDep struct, Dep string #63952
|
||||
pkg debug/elf, type DynamicVersionDep struct, Flags DynamicVersionFlag #63952
|
||||
pkg debug/elf, type DynamicVersionDep struct, Other uint16 #63952
|
||||
pkg debug/elf, type DynamicVersionFlag uint16 #63952
|
||||
pkg debug/elf, type DynamicVersionNeed struct #63952
|
||||
pkg debug/elf, type DynamicVersionNeed struct, Name string #63952
|
||||
pkg debug/elf, type DynamicVersionNeed struct, Needs []DynamicVersionDep #63952
|
||||
pkg debug/elf, type DynamicVersionNeed struct, Version uint16 #63952
|
||||
pkg debug/elf, type Symbol struct, VersionFlags SymbolVersionFlag #63952
|
||||
pkg debug/elf, type Symbol struct, VersionIndex int16 #63952
|
||||
pkg debug/elf, type SymbolVersionFlag uint8 #63952
|
||||
pkg encoding, type BinaryAppender interface { AppendBinary } #62384
|
||||
pkg encoding, type BinaryAppender interface, AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg encoding, type TextAppender interface { AppendText } #62384
|
||||
pkg encoding, type TextAppender interface, AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg go/types, method (*Interface) EmbeddedTypes() iter.Seq[Type] #66626
|
||||
pkg go/types, method (*Interface) ExplicitMethods() iter.Seq[*Func] #66626
|
||||
pkg go/types, method (*Interface) Methods() iter.Seq[*Func] #66626
|
||||
pkg go/types, method (*MethodSet) Methods() iter.Seq[*Selection] #66626
|
||||
pkg go/types, method (*Named) Methods() iter.Seq[*Func] #66626
|
||||
pkg go/types, method (*Scope) Children() iter.Seq[*Scope] #66626
|
||||
pkg go/types, method (*Struct) Fields() iter.Seq[*Var] #66626
|
||||
pkg go/types, method (*Tuple) Variables() iter.Seq[*Var] #66626
|
||||
pkg go/types, method (*TypeList) Types() iter.Seq[Type] #66626
|
||||
pkg go/types, method (*TypeParamList) TypeParams() iter.Seq[*TypeParam] #66626
|
||||
pkg go/types, method (*Union) Terms() iter.Seq[*Term] #66626
|
||||
pkg hash/maphash, func Comparable[$0 comparable](Seed, $0) uint64 #54670
|
||||
pkg hash/maphash, func WriteComparable[$0 comparable](*Hash, $0) #54670
|
||||
pkg log/slog, method (*LevelVar) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg log/slog, method (Level) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg log/slog, var DiscardHandler Handler #62005
|
||||
pkg math/big, method (*Float) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg math/big, method (*Int) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg math/big, method (*Rat) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg math/rand/v2, method (*ChaCha8) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg math/rand/v2, method (*PCG) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg net, method (IP) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg net/http, method (*Protocols) SetHTTP1(bool) #67814
|
||||
pkg net/http, method (*Protocols) SetHTTP2(bool) #67814
|
||||
pkg net/http, method (*Protocols) SetUnencryptedHTTP2(bool) #67816
|
||||
pkg net/http, method (Protocols) HTTP1() bool #67814
|
||||
pkg net/http, method (Protocols) HTTP2() bool #67814
|
||||
pkg net/http, method (Protocols) String() string #67814
|
||||
pkg net/http, method (Protocols) UnencryptedHTTP2() bool #67816
|
||||
pkg net/http, type HTTP2Config struct #67813
|
||||
pkg net/http, type HTTP2Config struct, CountError func(string) #67813
|
||||
pkg net/http, type HTTP2Config struct, MaxConcurrentStreams int #67813
|
||||
pkg net/http, type HTTP2Config struct, MaxDecoderHeaderTableSize int #67813
|
||||
pkg net/http, type HTTP2Config struct, MaxEncoderHeaderTableSize int #67813
|
||||
pkg net/http, type HTTP2Config struct, MaxReadFrameSize int #67813
|
||||
pkg net/http, type HTTP2Config struct, MaxReceiveBufferPerConnection int #67813
|
||||
pkg net/http, type HTTP2Config struct, MaxReceiveBufferPerStream int #67813
|
||||
pkg net/http, type HTTP2Config struct, PermitProhibitedCipherSuites bool #67813
|
||||
pkg net/http, type HTTP2Config struct, PingTimeout time.Duration #67813
|
||||
pkg net/http, type HTTP2Config struct, SendPingTimeout time.Duration #67813
|
||||
pkg net/http, type HTTP2Config struct, WriteByteTimeout time.Duration #67813
|
||||
pkg net/http, type Protocols struct #67814
|
||||
pkg net/http, type Server struct, HTTP2 *HTTP2Config #67813
|
||||
pkg net/http, type Server struct, Protocols *Protocols #67814
|
||||
pkg net/http, type Transport struct, HTTP2 *HTTP2Config #67813
|
||||
pkg net/http, type Transport struct, Protocols *Protocols #67814
|
||||
pkg net/netip, method (Addr) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg net/netip, method (Addr) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg net/netip, method (AddrPort) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg net/netip, method (AddrPort) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg net/netip, method (Prefix) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg net/netip, method (Prefix) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg net/url, method (*URL) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg os, func OpenInRoot(string, string) (*File, error) #67002
|
||||
pkg os, func OpenRoot(string) (*Root, error) #67002
|
||||
pkg os, method (*Root) Close() error #67002
|
||||
pkg os, method (*Root) Create(string) (*File, error) #67002
|
||||
pkg os, method (*Root) FS() fs.FS #67002
|
||||
pkg os, method (*Root) Lstat(string) (fs.FileInfo, error) #67002
|
||||
pkg os, method (*Root) Mkdir(string, fs.FileMode) error #67002
|
||||
pkg os, method (*Root) Name() string #67002
|
||||
pkg os, method (*Root) Open(string) (*File, error) #67002
|
||||
pkg os, method (*Root) OpenFile(string, int, fs.FileMode) (*File, error) #67002
|
||||
pkg os, method (*Root) OpenRoot(string) (*Root, error) #67002
|
||||
pkg os, method (*Root) Remove(string) error #67002
|
||||
pkg os, method (*Root) Stat(string) (fs.FileInfo, error) #67002
|
||||
pkg os, type Root struct #67002
|
||||
pkg regexp, method (*Regexp) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg runtime, func AddCleanup[$0 interface{}, $1 interface{}](*$0, func($1), $1) Cleanup #67535
|
||||
pkg runtime, func GOROOT //deprecated #51473
|
||||
pkg runtime, method (Cleanup) Stop() #67535
|
||||
pkg runtime, type Cleanup struct #67535
|
||||
pkg strings, func FieldsFuncSeq(string, func(int32) bool) iter.Seq[string] #61901
|
||||
pkg strings, func FieldsSeq(string) iter.Seq[string] #61901
|
||||
pkg strings, func Lines(string) iter.Seq[string] #61901
|
||||
pkg strings, func SplitAfterSeq(string, string) iter.Seq[string] #61901
|
||||
pkg strings, func SplitSeq(string, string) iter.Seq[string] #61901
|
||||
pkg testing, method (*B) Chdir(string) #62516
|
||||
pkg testing, method (*B) Context() context.Context #36532
|
||||
pkg testing, method (*B) Loop() bool #61515
|
||||
pkg testing, method (*F) Chdir(string) #62516
|
||||
pkg testing, method (*F) Context() context.Context #36532
|
||||
pkg testing, method (*T) Chdir(string) #62516
|
||||
pkg testing, method (*T) Context() context.Context #36532
|
||||
pkg testing, type TB interface, Chdir(string) #62516
|
||||
pkg testing, type TB interface, Context() context.Context #36532
|
||||
pkg time, method (Time) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg time, method (Time) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg weak, func Make[$0 interface{}](*$0) Pointer[$0] #67552
|
||||
pkg weak, method (Pointer[$0]) Value() *$0 #67552
|
||||
pkg weak, type Pointer[$0 interface{}] struct #67552
|
||||
@@ -1 +1,2 @@
|
||||
branch: master
|
||||
branch: release-branch.go1.23
|
||||
parent-branch: master
|
||||
|
||||
@@ -70,6 +70,6 @@ To begin the next release development cycle, populate the contents of `next`
|
||||
with those of `initial`. From the repo root:
|
||||
|
||||
> cd doc
|
||||
> cp -R initial/ next
|
||||
> cp -r initial/* next
|
||||
|
||||
Then edit `next/1-intro.md` to refer to the next version.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Language version go1.17 (Oct 15, 2021)",
|
||||
"Subtitle": "Version of Oct 15, 2021",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ while still insisting that races are errors and that tools can diagnose and repo
|
||||
<p>
|
||||
The following formal definition of Go's memory model closely follows
|
||||
the approach presented by Hans-J. Boehm and Sarita V. Adve in
|
||||
“<a href="https://dl.acm.org/doi/10.1145/1375581.1375591">Foundations of the C++ Concurrency Memory Model</a>”,
|
||||
“<a href="https://www.hpl.hp.com/techreports/2008/HPL-2008-56.pdf">Foundations of the C++ Concurrency Memory Model</a>”,
|
||||
published in PLDI 2008.
|
||||
The definition of data-race-free programs and the guarantee of sequential consistency
|
||||
for race-free programs are equivalent to the ones in that work.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Language version go1.24 (Nov 20, 2024)",
|
||||
"Subtitle": "Language version go1.23 (June 13, 2024)",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
@@ -1086,7 +1086,7 @@ A field declared with a type but no explicit field name is called an <i>embedded
|
||||
An embedded field must be specified as
|
||||
a type name <code>T</code> or as a pointer to a non-interface type name <code>*T</code>,
|
||||
and <code>T</code> itself may not be
|
||||
a pointer type or type parameter. The unqualified type name acts as the field name.
|
||||
a pointer type. The unqualified type name acts as the field name.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -1127,7 +1127,7 @@ of a struct except that they cannot be used as field names in
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Given a struct type <code>S</code> and a type name
|
||||
Given a struct type <code>S</code> and a <a href="#Types">named type</a>
|
||||
<code>T</code>, promoted methods are included in the method set of the struct as follows:
|
||||
</p>
|
||||
<ul>
|
||||
@@ -1927,8 +1927,8 @@ components have identical types. In detail:
|
||||
<li>Two slice types are identical if they have identical element types.</li>
|
||||
|
||||
<li>Two struct types are identical if they have the same sequence of fields,
|
||||
and if corresponding pairs of fields have the same names, identical types,
|
||||
and identical tags, and are either both embedded or both not embedded.
|
||||
and if corresponding fields have the same names, and identical types,
|
||||
and identical tags.
|
||||
<a href="#Exported_identifiers">Non-exported</a> field names from different
|
||||
packages are always different.</li>
|
||||
|
||||
@@ -2511,12 +2511,12 @@ An alias declaration binds an identifier to the given type
|
||||
</p>
|
||||
|
||||
<pre class="ebnf">
|
||||
AliasDecl = identifier [ TypeParameters ] "=" Type .
|
||||
AliasDecl = identifier "=" Type .
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Within the <a href="#Declarations_and_scope">scope</a> of
|
||||
the identifier, it serves as an <i>alias</i> for the given type.
|
||||
the identifier, it serves as an <i>alias</i> for the type.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -2526,24 +2526,6 @@ type (
|
||||
)
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If the alias declaration specifies <a href="#Type_parameter_declarations">type parameters</a>
|
||||
[<a href="#Go_1.24">Go 1.24</a>], the type name denotes a <i>generic alias</i>.
|
||||
Generic aliases must be <a href="#Instantiations">instantiated</a> when they
|
||||
are used.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
type set[P comparable] = map[P]bool
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
In an alias declaration the given type cannot be a type parameter.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
type A[P any] = P // illegal: P is a type parameter
|
||||
</pre>
|
||||
|
||||
<h4 id="Type_definitions">Type definitions</h4>
|
||||
|
||||
@@ -3093,7 +3075,7 @@ to the base type <code>Point</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If the receiver base type is a <a href="#Type_definitions">generic type</a>, the
|
||||
If the receiver base type is a <a href="#Type_declarations">generic type</a>, the
|
||||
receiver specification must declare corresponding type parameters for the method
|
||||
to use. This makes the receiver type parameters available to the method.
|
||||
Syntactically, this type parameter declaration looks like an
|
||||
@@ -3117,22 +3099,6 @@ func (p Pair[A, B]) Swap() Pair[B, A] { … } // receiver declares A, B
|
||||
func (p Pair[First, _]) First() First { … } // receiver declares First, corresponds to A in Pair
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If the receiver type is denoted by (a pointer to) an <a href="#Alias_declarations">alias</a>,
|
||||
the alias must not be generic and it must not denote an instantiated generic type, neither
|
||||
directly nor indirectly via another alias, and irrespective of pointer indirections.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
type GPoint[P any] = Point
|
||||
type HPoint = *GPoint[int]
|
||||
type IPair = Pair[int, int]
|
||||
|
||||
func (*GPoint[P]) Draw(P) { … } // illegal: alias must not be generic
|
||||
func (HPoint) Draw(P) { … } // illegal: alias must not denote instantiated type GPoint[int]
|
||||
func (*IPair) Second() int { … } // illegal: alias must not denote instantiated type Pair[int, int]
|
||||
</pre>
|
||||
|
||||
<h2 id="Expressions">Expressions</h2>
|
||||
|
||||
<p>
|
||||
@@ -8721,15 +8687,6 @@ integer values from zero to an upper limit.
|
||||
function as range expression.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4 id="Go_1.24">Go 1.24</h4>
|
||||
<ul>
|
||||
<li>
|
||||
An <a href="#Alias_declarations">alias declaration</a> may declare
|
||||
<a href="#Type_parameter_declarations">type parameters</a>.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="Type_unification_rules">Type unification rules</h3>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -34,7 +34,6 @@ For example, if a Go program is running in an environment that contains
|
||||
|
||||
then that Go program will disable the use of HTTP/2 by default in both
|
||||
the HTTP client and the HTTP server.
|
||||
Unrecognized settings in the `GODEBUG` environment variable are ignored.
|
||||
It is also possible to set the default `GODEBUG` for a given program
|
||||
(discussed below).
|
||||
|
||||
@@ -151,68 +150,6 @@ for example,
|
||||
see the [runtime documentation](/pkg/runtime#hdr-Environment_Variables)
|
||||
and the [go command documentation](/cmd/go#hdr-Build_and_test_caching).
|
||||
|
||||
### Go 1.24
|
||||
|
||||
Go 1.24 changed the global [`math/rand.Seed`](/pkg/math/rand/#Seed) to be a
|
||||
no-op. This behavior is controlled by the `randseednop` setting.
|
||||
For Go 1.24 it defaults to `randseednop=1`.
|
||||
Using `randseednop=0` reverts to the pre-Go 1.24 behavior.
|
||||
|
||||
Go 1.24 added new values for the `multipathtcp` setting.
|
||||
The possible values for `multipathtcp` are now:
|
||||
- "0": disable MPTCP on dialers and listeners by default
|
||||
- "1": enable MPTCP on dialers and listeners by default
|
||||
- "2": enable MPTCP on listeners only by default
|
||||
- "3": enable MPTCP on dialers only by default
|
||||
|
||||
For Go 1.24, it now defaults to multipathtcp="2", thus
|
||||
enabled by default on listeners. Using multipathtcp="0" reverts to the
|
||||
pre-Go 1.24 behavior.
|
||||
|
||||
Go 1.24 changed the behavior of `go test -json` to emit build errors as JSON
|
||||
instead of text.
|
||||
These new JSON events are distinguished by new `Action` values,
|
||||
but can still cause problems with CI systems that aren't robust to these events.
|
||||
This behavior can be controlled with the `gotestjsonbuildtext` setting.
|
||||
Using `gotestjsonbuildtext=1` restores the 1.23 behavior.
|
||||
This setting will be removed in a future release, Go 1.28 at the earliest.
|
||||
|
||||
Go 1.24 changed [`crypto/rsa`](/pkg/crypto/rsa) to require RSA keys to be at
|
||||
least 1024 bits. This behavior can be controlled with the `rsa1024min` setting.
|
||||
Using `rsa1024min=0` restores the Go 1.23 behavior.
|
||||
|
||||
Go 1.24 introduced a mechanism for enabling platform specific Data Independent
|
||||
Timing (DIT) modes in the [`crypto/subtle`](/pkg/crypto/subtle) package. This
|
||||
mode can be enabled for an entire program with the `dataindependenttiming` setting.
|
||||
For Go 1.24 it defaults to `dataindependenttiming=0`. There is no change in default
|
||||
behavior from Go 1.23 when `dataindependenttiming` is unset.
|
||||
Using `dataindependenttiming=1` enables the DIT mode for the entire Go program.
|
||||
When enabled, DIT will be enabled when calling into C from Go. When enabled,
|
||||
calling into Go code from C will enable DIT, and disable it before returning to
|
||||
C if it was not enabled when Go code was entered.
|
||||
This currently only affects arm64 programs. For all other platforms it is a no-op.
|
||||
|
||||
Go 1.24 removed the `x509sha1` setting. `crypto/x509` no longer supports verifying
|
||||
signatures on certificates that use SHA-1 based signature algorithms.
|
||||
|
||||
Go 1.24 changes the default value of the [`x509usepolicies`
|
||||
setting.](/pkg/crypto/x509/#CreateCertificate) from `0` to `1`. When marshalling
|
||||
certificates, policies are now taken from the
|
||||
[`Certificate.Policies`](/pkg/crypto/x509/#Certificate.Policies) field rather
|
||||
than the
|
||||
[`Certificate.PolicyIdentifiers`](/pkg/crypto/x509/#Certificate.PolicyIdentifiers)
|
||||
field by default.
|
||||
|
||||
Go 1.24 enabled the post-quantum key exchange mechanism
|
||||
X25519MLKEM768 by default. The default can be reverted using the
|
||||
[`tlsmlkem` setting](/pkg/crypto/tls/#Config.CurvePreferences).
|
||||
Go 1.24 also removed X25519Kyber768Draft00 and the Go 1.23 `tlskyber` setting.
|
||||
|
||||
Go 1.24 made [`ParsePKCS1PrivateKey`](/pkg/crypto/x509/#ParsePKCS1PrivateKey)
|
||||
use and validate the CRT parameters in the encoded private key. This behavior
|
||||
can be controlled with the `x509rsacrt` setting. Using `x509rsacrt=0` restores
|
||||
the Go 1.23 behavior.
|
||||
|
||||
### Go 1.23
|
||||
|
||||
Go 1.23 changed the channels created by package time to be unbuffered
|
||||
@@ -405,7 +342,7 @@ There is no plan to remove this setting.
|
||||
|
||||
Go 1.18 removed support for SHA1 in most X.509 certificates,
|
||||
controlled by the [`x509sha1` setting](/pkg/crypto/x509#InsecureAlgorithmError).
|
||||
This setting was removed in Go 1.24.
|
||||
This setting will be removed in a future release, Go 1.22 at the earliest.
|
||||
|
||||
### Go 1.10
|
||||
|
||||
|
||||
14
doc/next/1-intro.md
Normal file
14
doc/next/1-intro.md
Normal file
@@ -0,0 +1,14 @@
|
||||
<!--
|
||||
NOTE: In this document and others in this directory, the convention is to
|
||||
set fixed-width phrases with non-fixed-width spaces, as in
|
||||
`hello` `world`.
|
||||
-->
|
||||
|
||||
<style>
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
## DRAFT RELEASE NOTES — Introduction to Go 1.23 {#introduction}
|
||||
|
||||
**Go 1.23 is not yet released. These are work-in-progress release notes.
|
||||
Go 1.23 is expected to be released in August 2024.**
|
||||
18
doc/next/2-language.md
Normal file
18
doc/next/2-language.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## Changes to the language {#language}
|
||||
|
||||
<!-- go.dev/issue/61405, CL 557835, CL 584596 -->
|
||||
Go 1.23 makes the (Go 1.22) ["range-over-func" experiment](/wiki/RangefuncExperiment) a part of the language.
|
||||
The "range" clause in a "for-range" loop now accepts iterator functions of the following types
|
||||
|
||||
func(func() bool)
|
||||
func(func(K) bool)
|
||||
func(func(K, V) bool)
|
||||
|
||||
as range expressions.
|
||||
Calls of the iterator argument function produce the iteration values for the "for-range" loop.
|
||||
For details see the [iter] package documentation and the [language spec](/ref/spec#For_range).
|
||||
For motivation see the 2022 ["range-over-func" discussion](/issue/56413).
|
||||
|
||||
<!-- go.dev/issue/46477, CL 566856, CL 586955, CL 586956 -->
|
||||
Go 1.23 includes preview support for [generic type aliases](/issue/46477).
|
||||
Building the toolchain with `GOEXPERIMENT=aliastypeparams` enables this feature.
|
||||
84
doc/next/3-tools.md
Normal file
84
doc/next/3-tools.md
Normal file
@@ -0,0 +1,84 @@
|
||||
## Tools {#tools}
|
||||
|
||||
### Telemetry
|
||||
|
||||
<!-- go.dev/issue/58894, go.dev/issue/67111 -->
|
||||
Starting in Go 1.23, the Go toolchain can collect usage and breakage
|
||||
statistics that help the Go team understand how the Go toolchain is
|
||||
used and how well it is working. We refer to these statistics as
|
||||
[Go telemetry](/doc/telemetry).
|
||||
|
||||
Go telemetry is an _opt-in system_, controlled by the
|
||||
[`go` `telemetry` command](/cmd/go/#hdr-Manage_telemetry_data_and_settings).
|
||||
By default, the toolchain programs
|
||||
collect statistics in counter files that can be inspected locally
|
||||
but are otherwise unused (`go` `telemetry` `local`).
|
||||
|
||||
To help us keep Go working well and understand Go usage,
|
||||
please consider opting in to Go telemetry by running
|
||||
`go` `telemetry` `on`.
|
||||
In that mode,
|
||||
anonymous counter reports are uploaded to
|
||||
[telemetry.go.dev](https://telemetry.go.dev) weekly,
|
||||
where they are aggregated into graphs and also made
|
||||
available for download by any Go contributors or users
|
||||
wanting to analyze the data.
|
||||
See “[Go Telemetry](/doc/telemetry)” for more details
|
||||
about the Go Telemetry system.
|
||||
|
||||
### Go command {#go-command}
|
||||
|
||||
Setting the `GOROOT_FINAL` environment variable no longer has an effect
|
||||
([#62047](/issue/62047)).
|
||||
Distributions that install the `go` command to a location other than
|
||||
`$GOROOT/bin/go` should install a symlink instead of relocating
|
||||
or copying the `go` binary.
|
||||
|
||||
<!-- go.dev/issue/34208, CL 563137, CL 586095 -->
|
||||
The new `go` `env` `-changed` flag causes the command to print only
|
||||
those settings whose effective value differs from the default value
|
||||
that would be obtained in an empty environment with no prior uses of the `-w` flag.
|
||||
|
||||
<!-- go.dev/issue/27005, CL 585401 -->
|
||||
The new `go` `mod` `tidy` `-diff` flag causes the command not to modify
|
||||
the files but instead print the necessary changes as a unified diff.
|
||||
It exits with a non-zero code if updates are needed.
|
||||
|
||||
<!-- go.dev/issue/52792, CL 562775 -->
|
||||
The `go` `list` `-m` `-json` command now includes new `Sum` and `GoModSum` fields.
|
||||
This is similar to the existing behavior of the `go` `mod` `download` `-json` command.
|
||||
|
||||
<!-- go.dev/issue/65573 ("cmd/go: separate default GODEBUGs from go language version") -->
|
||||
The new `godebug` directive in `go.mod` and `go.work` declares a
|
||||
[GODEBUG setting](/doc/godebug) to apply for the work module or workspace in use.
|
||||
|
||||
### Vet {#vet}
|
||||
|
||||
<!-- go.dev/issue/46136 -->
|
||||
The `go vet` subcommand now includes the
|
||||
[stdversion](https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/stdversion)
|
||||
analyzer, which flags references to symbols that are too new for the version
|
||||
of Go in effect in the referring file. (The effective version is determined
|
||||
by the `go` directive in the file's enclosing `go.mod` file, and
|
||||
by any [`//go:build` constraints](/cmd/go#hdr-Build_constraints)
|
||||
in the file.)
|
||||
|
||||
For example, it will report a diagnostic for a reference to the
|
||||
`reflect.TypeFor` function (introduced in go1.22) from a file in a
|
||||
module whose go.mod file specifies `go 1.21`.
|
||||
|
||||
### Cgo {#cgo}
|
||||
|
||||
<!-- go.dev/issue/66456 -->
|
||||
[cmd/cgo] supports the new `-ldflags` flag for passing flags to the C linker.
|
||||
The `go` command uses it automatically, avoiding "argument list too long"
|
||||
errors with a very large `CGO_LDFLAGS`.
|
||||
|
||||
### Trace {#trace}
|
||||
|
||||
<!-- go.dev/issue/65316 -->
|
||||
The `trace` tool now better tolerates partially broken traces by attempting to
|
||||
recover what trace data it can. This functionality is particularly helpful when
|
||||
viewing a trace that was collected during a program crash, since the trace data
|
||||
leading up to the crash will now [be recoverable](/issue/65319) under most
|
||||
circumstances.
|
||||
7
doc/next/4-runtime.md
Normal file
7
doc/next/4-runtime.md
Normal file
@@ -0,0 +1,7 @@
|
||||
## Runtime {#runtime}
|
||||
|
||||
The traceback printed by the runtime after an unhandled panic or other
|
||||
fatal error now indents the second and subsequent lines of the error
|
||||
message (for example, the argument to panic) by a single tab, so that
|
||||
it can be unambiguously distinguished from the stack trace of the
|
||||
first goroutine. See [#64590](/issue/64590) for discussion.
|
||||
38
doc/next/5-toolchain.md
Normal file
38
doc/next/5-toolchain.md
Normal file
@@ -0,0 +1,38 @@
|
||||
## Compiler {#compiler}
|
||||
|
||||
The build time overhead to building with [Profile Guided Optimization](/doc/pgo) has been reduced significantly.
|
||||
Previously, large builds could see 100%+ build time increase from enabling PGO.
|
||||
In Go 1.23, overhead should be in the single digit percentages.
|
||||
|
||||
<!-- https://go.dev/issue/62737 , https://golang.org/cl/576681, https://golang.org/cl/577615 -->
|
||||
The compiler in Go 1.23 can now overlap the stack frame slots of local variables
|
||||
accessed in disjoint regions of a function, which reduces stack usage
|
||||
for Go applications.
|
||||
|
||||
<!-- https://go.dev/cl/577935 -->
|
||||
For 386 and amd64, the compiler will use information from PGO to align certain
|
||||
hot blocks in loops. This improves performance an additional 1-1.5% at
|
||||
a cost of an additional 0.1% text and binary size. This is currently only implemented
|
||||
on 386 and amd64 because it has not shown an improvement on other platforms.
|
||||
Hot block alignment can be disabled with `-gcflags=[<packages>=]-d=alignhot=0`
|
||||
|
||||
## Assembler {#assembler}
|
||||
|
||||
## Linker {#linker}
|
||||
|
||||
<!-- go.dev/issue/67401, CL 585556, CL 587220, and many more -->
|
||||
The linker now disallows using a `//go:linkname` directive to refer to
|
||||
internal symbols in the standard library (including the runtime) that
|
||||
are not marked with `//go:linkname` on their definitions.
|
||||
Similarly, the linker disallows references to such symbols from assembly
|
||||
code.
|
||||
For backward compatibility, existing usages of `//go:linkname` found in
|
||||
a large open-source code corpus remain supported.
|
||||
Any new references to standard library internal symbols will be disallowed.
|
||||
|
||||
A linker command line flag `-checklinkname=0` can be used to disable
|
||||
this check, for debugging and experimenting purposes.
|
||||
|
||||
<!-- CL 473495 -->
|
||||
When building a dynamically linked ELF binary (including PIE binary), the
|
||||
new `-bindnow` flag enables immediate function binding.
|
||||
2
doc/next/6-stdlib/0-heading.md
Normal file
2
doc/next/6-stdlib/0-heading.md
Normal file
@@ -0,0 +1,2 @@
|
||||
## Core library {#library}
|
||||
|
||||
32
doc/next/6-stdlib/1-time.md
Normal file
32
doc/next/6-stdlib/1-time.md
Normal file
@@ -0,0 +1,32 @@
|
||||
### Timer changes
|
||||
|
||||
Go 1.23 makes two significant changes to the implementation of
|
||||
[time.Timer] and [time.Ticker].
|
||||
|
||||
<!-- go.dev/issue/61542 -->
|
||||
First, `Timer`s and `Ticker`s that are no longer referred to by the program
|
||||
become eligible for garbage collection immediately, even if their
|
||||
`Stop` methods have not been called.
|
||||
Earlier versions of Go did not collect unstopped `Timer`s until after
|
||||
they had fired and never collected unstopped `Ticker`s.
|
||||
|
||||
<!-- go.dev/issue/37196 -->
|
||||
Second, the timer channel associated with a `Timer` or `Ticker` is
|
||||
now unbuffered, with capacity 0.
|
||||
The main effect of this change is that Go now guarantees
|
||||
that for any call to a `Reset` or `Stop` method, no stale values
|
||||
prepared before that call will be sent or received after the call.
|
||||
Earlier versions of Go used channels with a one-element buffer,
|
||||
making it difficult to use `Reset` and `Stop` correctly.
|
||||
A visible effect of this change is that `len` and `cap` of timer channels
|
||||
now returns 0 instead of 1, which may affect programs that
|
||||
poll the length to decide whether a receive on the timer channel
|
||||
will succeed.
|
||||
Such code should use a non-blocking receive instead.
|
||||
|
||||
These new behaviors are only enabled when the main Go program
|
||||
is in a module with a `go.mod` `go` line using Go 1.23.0 or later.
|
||||
When Go 1.23 builds older programs, the old behaviors remain in effect.
|
||||
The new [GODEBUG setting](/doc/godebug) [`asynctimerchan=1`](/pkg/time/#NewTimer)
|
||||
can be used to revert back to asynchronous channel behaviors
|
||||
even when a program names Go 1.23.0 or later in its `go.mod` file.
|
||||
13
doc/next/6-stdlib/2-unique.md
Normal file
13
doc/next/6-stdlib/2-unique.md
Normal file
@@ -0,0 +1,13 @@
|
||||
### New unique package
|
||||
|
||||
The new [unique] package provides facilities for
|
||||
canonicalizing values (like "interning" or "hash-consing").
|
||||
|
||||
Any value of comparable type may be canonicalized with the new
|
||||
`Make[T]` function, which produces a reference to a canonical copy of
|
||||
the value in the form of a `Handle[T]`.
|
||||
Two `Handle[T]` are equal if and only if the values used to produce the
|
||||
handles are equal, allowing programs to deduplicate values and reduce
|
||||
their memory footprint.
|
||||
Comparing two `Handle[T]` values is efficient, reducing down to a simple
|
||||
pointer comparison.
|
||||
29
doc/next/6-stdlib/3-iter.md
Normal file
29
doc/next/6-stdlib/3-iter.md
Normal file
@@ -0,0 +1,29 @@
|
||||
### Iterators
|
||||
|
||||
The new [iter] package provides the basic definitions for working with
|
||||
user-defined iterators.
|
||||
|
||||
The [slices] package adds several functions that work with iterators:
|
||||
- [All](/pkg/slices#All) returns an iterator over slice indexes and values.
|
||||
- [Values](/pkg/slices#Values) returns an iterator over slice elements.
|
||||
- [Backward](/pkg/slices#Backward) returns an iterator that loops over
|
||||
a slice backward.
|
||||
- [Collect](/pkg/slices#Collect) collects values from an iterator into
|
||||
a new slice.
|
||||
- [AppendSeq](/pkg/slices#AppendSeq) appends values from an iterator to
|
||||
an existing slice.
|
||||
- [Sorted](/pkg/slices#Sorted) collects values from an iterator into a
|
||||
new slice, and then sorts the slice.
|
||||
- [SortedFunc](/pkg/slices#SortedFunc) is like `Sorted` but with a
|
||||
comparison function.
|
||||
- [SortedStableFunc](/pkg/slices#SortedStableFunc) is like `SortFunc`
|
||||
but uses a stable sort algorithm.
|
||||
- [Chunk](/pkg/slices#Chunk) returns an iterator over consecutive
|
||||
sub-slices of up to n elements of a slice.
|
||||
|
||||
The [maps] package adds several functions that work with iterators:
|
||||
- [All](/pkg/maps#All) returns an iterator over key-value pairs from a map.
|
||||
- [Keys](/pkg/maps#Keys) returns an iterator over keys in a map.
|
||||
- [Values](/pkg/maps#Values) returns an iterator over values in a map.
|
||||
- [Insert](/pkg/maps#Insert) adds the key-value pairs from an iterator to an existing map.
|
||||
- [Collect](/pkg/maps#Collect) collects key-value pairs from an iterator into a new map and returns it.
|
||||
11
doc/next/6-stdlib/4-structs.md
Normal file
11
doc/next/6-stdlib/4-structs.md
Normal file
@@ -0,0 +1,11 @@
|
||||
### New structs package
|
||||
|
||||
The new [structs] package provides
|
||||
types for struct fields that modify properties of
|
||||
the containing struct type such as memory layout.
|
||||
|
||||
In this release, the only such type is
|
||||
[`HostLayout`](/pkg/structs#HostLayout)
|
||||
which indicates that a structure with a field of that
|
||||
type has a layout that conforms to host platform
|
||||
expectations.
|
||||
3
doc/next/6-stdlib/99-minor/0-heading.md
Normal file
3
doc/next/6-stdlib/99-minor/0-heading.md
Normal file
@@ -0,0 +1,3 @@
|
||||
### Minor changes to the library {#minor_library_changes}
|
||||
|
||||
|
||||
1
doc/next/6-stdlib/99-minor/README
Normal file
1
doc/next/6-stdlib/99-minor/README
Normal file
@@ -0,0 +1 @@
|
||||
API changes and other small changes to the standard library go here.
|
||||
4
doc/next/6-stdlib/99-minor/archive/tar/50102.md
Normal file
4
doc/next/6-stdlib/99-minor/archive/tar/50102.md
Normal file
@@ -0,0 +1,4 @@
|
||||
If the argument to [FileInfoHeader] implements the new [FileInfoNames]
|
||||
interface, then the interface methods will be used to set the Uname/Gname
|
||||
of the file header. This allows applications to override the system-dependent
|
||||
Uname/Gname lookup.
|
||||
3
doc/next/6-stdlib/99-minor/crypto/tls/63369.md
Normal file
3
doc/next/6-stdlib/99-minor/crypto/tls/63369.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The TLS client now supports the Encrypted Client Hello [draft specification](https://www.ietf.org/archive/id/draft-ietf-tls-esni-18.html).
|
||||
This feature can be enabled by setting the [Config.EncryptedClientHelloConfigList]
|
||||
field to an encoded ECHConfigList for the host that is being connected to.
|
||||
3
doc/next/6-stdlib/99-minor/crypto/tls/63691.md
Normal file
3
doc/next/6-stdlib/99-minor/crypto/tls/63691.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The [QUICConn] type used by QUIC implementations includes new events
|
||||
reporting on the state of session resumption, and provides a way for
|
||||
the QUIC layer to add data to session tickets and session cache entries.
|
||||
3
doc/next/6-stdlib/99-minor/crypto/tls/66214.md
Normal file
3
doc/next/6-stdlib/99-minor/crypto/tls/66214.md
Normal file
@@ -0,0 +1,3 @@
|
||||
3DES cipher suites were removed from the default list used when
|
||||
[Config.CipherSuites] is nil. The default can be reverted by adding `tls3des=1` to
|
||||
the GODEBUG environment variable.
|
||||
3
doc/next/6-stdlib/99-minor/crypto/tls/67061.md
Normal file
3
doc/next/6-stdlib/99-minor/crypto/tls/67061.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The experimental post-quantum key exchange mechanism X25519Kyber768Draft00
|
||||
is now enabled by default when [Config.CurvePreferences] is nil.
|
||||
The default can be reverted by adding `tlskyber=0` to the GODEBUG environment variable.
|
||||
3
doc/next/6-stdlib/99-minor/crypto/tls/67065.md
Normal file
3
doc/next/6-stdlib/99-minor/crypto/tls/67065.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Go 1.23 changed the behavior of [X509KeyPair] and [LoadX509KeyPair]
|
||||
to populate the [Certificate.Leaf] field of the returned [Certificate].
|
||||
The new `x509keypairleaf` [GODEBUG setting](/doc/godebug) is added for this behavior.
|
||||
3
doc/next/6-stdlib/99-minor/crypto/x509/45990.md
Normal file
3
doc/next/6-stdlib/99-minor/crypto/x509/45990.md
Normal file
@@ -0,0 +1,3 @@
|
||||
[CreateCertificateRequest] now correct supports RSA-PSS signature algorithms.
|
||||
|
||||
[CreateCertificateRequest] and [CreateRevocationList] now verify the generated signature using the signer’s public key. If the signature is invalid, an error is returned. This has been the behavior of [CreateCertificate] since Go 1.16.
|
||||
4
doc/next/6-stdlib/99-minor/crypto/x509/62048.md
Normal file
4
doc/next/6-stdlib/99-minor/crypto/x509/62048.md
Normal file
@@ -0,0 +1,4 @@
|
||||
The [`x509sha1` GODEBUG setting](/pkg/crypto/x509#InsecureAlgorithmError) will
|
||||
be removed in the next Go major release (Go 1.24). This will mean that crypto/x509
|
||||
will no longer support verifying signatures on certificates that use SHA-1 based
|
||||
signature algorithms.
|
||||
3
doc/next/6-stdlib/99-minor/crypto/x509/66249.md
Normal file
3
doc/next/6-stdlib/99-minor/crypto/x509/66249.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The new [ParseOID] function parses a dot-encoded ASN.1 Object Identifier string.
|
||||
The [OID] type now implements the [encoding.BinaryMarshaler],
|
||||
[encoding.BinaryUnmarshaler], [encoding.TextMarshaler], [encoding.TextUnmarshaler] interfaces.
|
||||
3
doc/next/6-stdlib/99-minor/database/sql/64707.md
Normal file
3
doc/next/6-stdlib/99-minor/database/sql/64707.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Errors returned by [driver.Valuer] implementations are now wrapped for
|
||||
improved error handling during operations like [DB.Query], [DB.Exec],
|
||||
and [DB.QueryRow].
|
||||
3
doc/next/6-stdlib/99-minor/debug/elf/66054.md
Normal file
3
doc/next/6-stdlib/99-minor/debug/elf/66054.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The `debug/elf` package now defines [PT_OPENBSD_NOBTCFI]. This [ProgType] is
|
||||
used to disable Branch Tracking Control Flow Integrity (BTCFI) enforcement
|
||||
on OpenBSD binaries.
|
||||
2
doc/next/6-stdlib/99-minor/debug/elf/66836.md
Normal file
2
doc/next/6-stdlib/99-minor/debug/elf/66836.md
Normal file
@@ -0,0 +1,2 @@
|
||||
Now defines the symbol type constants [STT_RELC], [STT_SRELC], and
|
||||
[STT_GNU_IFUNC].
|
||||
3
doc/next/6-stdlib/99-minor/encoding/binary/60023.md
Normal file
3
doc/next/6-stdlib/99-minor/encoding/binary/60023.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The new [Encode] and [Decode] functions are byte slice equivalents
|
||||
to [Read] and [Write].
|
||||
[Append] allows marshaling multiple data into the same byte slice.
|
||||
2
doc/next/6-stdlib/99-minor/go/ast/66339.md
Normal file
2
doc/next/6-stdlib/99-minor/go/ast/66339.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The new [Preorder] function returns a convenient iterator over all the
|
||||
nodes of a syntax tree.
|
||||
1
doc/next/6-stdlib/99-minor/go/types/46477.md
Normal file
1
doc/next/6-stdlib/99-minor/go/types/46477.md
Normal file
@@ -0,0 +1 @@
|
||||
<!-- see ../../../../2-language.md -->
|
||||
3
doc/next/6-stdlib/99-minor/go/types/65772.md
Normal file
3
doc/next/6-stdlib/99-minor/go/types/65772.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The [Func] type, which represents a function or method symbol, now
|
||||
has a [Func.Signature] method that returns the function's type, which
|
||||
is always a `Signature`.
|
||||
3
doc/next/6-stdlib/99-minor/go/types/66559.md
Normal file
3
doc/next/6-stdlib/99-minor/go/types/66559.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The [Alias] type now has an [Rhs] method that returns the type on the
|
||||
right-hand side of its declaration: given `type A = B`, the `Rhs` of A
|
||||
is B. ([#66559](/issue/66559))
|
||||
2
doc/next/6-stdlib/99-minor/go/types/67143.md
Normal file
2
doc/next/6-stdlib/99-minor/go/types/67143.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The methods [Alias.Origin], [Alias.SetTypeParams], [Alias.TypeParams],
|
||||
and [Alias.TypeArgs] have been added. They are needed for generic alias types.
|
||||
4
doc/next/6-stdlib/99-minor/go/types/cl-577715.md
Normal file
4
doc/next/6-stdlib/99-minor/go/types/cl-577715.md
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- CL 577715, CL 579076 -->
|
||||
By default, go/types now produces [Alias] type nodes for type aliases.
|
||||
This behavior can be controlled by the `GODEBUG` `gotypesalias` flag.
|
||||
Its default has changed from 0 in Go 1.22 to 1 in Go 1.23.
|
||||
1
doc/next/6-stdlib/99-minor/iter/61897.md
Normal file
1
doc/next/6-stdlib/99-minor/iter/61897.md
Normal file
@@ -0,0 +1 @@
|
||||
<!-- see ../../3-iter.md -->
|
||||
1
doc/next/6-stdlib/99-minor/maps/61900.md
Normal file
1
doc/next/6-stdlib/99-minor/maps/61900.md
Normal file
@@ -0,0 +1 @@
|
||||
<!-- see ../../3-iter.md -->
|
||||
2
doc/next/6-stdlib/99-minor/math/rand/v2/61716.md
Normal file
2
doc/next/6-stdlib/99-minor/math/rand/v2/61716.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The [Uint] function and [Rand.Uint] method have been added.
|
||||
They were inadvertently left out of Go 1.22.
|
||||
1
doc/next/6-stdlib/99-minor/math/rand/v2/67059.md
Normal file
1
doc/next/6-stdlib/99-minor/math/rand/v2/67059.md
Normal file
@@ -0,0 +1 @@
|
||||
The new [ChaCha8.Read] method implements the [io.Reader] interface.
|
||||
3
doc/next/6-stdlib/99-minor/net/62254.md
Normal file
3
doc/next/6-stdlib/99-minor/net/62254.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The new type [KeepAliveConfig] permits fine-tuning the keep-alive
|
||||
options for TCP connections, via a new [TCPConn.SetKeepAliveConfig]
|
||||
method and new KeepAliveConfig fields for [Dialer] and [ListenConfig].
|
||||
3
doc/next/6-stdlib/99-minor/net/63116.md
Normal file
3
doc/next/6-stdlib/99-minor/net/63116.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The [DNSError] type now wraps errors caused by timeouts or cancellation.
|
||||
For example, `errors.Is(someDNSErr, context.DeadlineExceedeed)`
|
||||
will now report whether a DNS error was caused by a timeout.
|
||||
3
doc/next/6-stdlib/99-minor/net/67925.md
Normal file
3
doc/next/6-stdlib/99-minor/net/67925.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The new `GODEBUG` setting `netedns0=0` disables sending EDNS0
|
||||
additional headers on DNS requests, as they reportedly break the DNS
|
||||
server on some modems.
|
||||
3
doc/next/6-stdlib/99-minor/net/http/46443.md
Normal file
3
doc/next/6-stdlib/99-minor/net/http/46443.md
Normal file
@@ -0,0 +1,3 @@
|
||||
[Cookie] now preserves double quotes surrounding a cookie value.
|
||||
The new [Cookie.Quoted] field indicates whether the [Cookie.Value]
|
||||
was originally quoted.
|
||||
1
doc/next/6-stdlib/99-minor/net/http/61472.md
Normal file
1
doc/next/6-stdlib/99-minor/net/http/61472.md
Normal file
@@ -0,0 +1 @@
|
||||
The new [Request.CookiesNamed] method retrieves all cookies that match the given name.
|
||||
1
doc/next/6-stdlib/99-minor/net/http/62490.md
Normal file
1
doc/next/6-stdlib/99-minor/net/http/62490.md
Normal file
@@ -0,0 +1 @@
|
||||
The new [Cookie.Partitioned] field identifies cookies with the Partitioned attribute.
|
||||
2
doc/next/6-stdlib/99-minor/net/http/64910.md
Normal file
2
doc/next/6-stdlib/99-minor/net/http/64910.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The patterns used by [ServeMux] now allow one or more spaces or tabs after the method name.
|
||||
Previously, only a single space was permitted.
|
||||
7
doc/next/6-stdlib/99-minor/net/http/66008.md
Normal file
7
doc/next/6-stdlib/99-minor/net/http/66008.md
Normal file
@@ -0,0 +1,7 @@
|
||||
The new [ParseCookie] function parses a Cookie header value and
|
||||
returns all the cookies which were set in it. Since the same cookie
|
||||
name can appear multiple times the returned Values can contain
|
||||
more than one value for a given key.
|
||||
|
||||
The new [ParseSetCookie] function parses a Set-Cookie header value and
|
||||
returns a cookie. It returns an error on syntax error.
|
||||
16
doc/next/6-stdlib/99-minor/net/http/66343.md
Normal file
16
doc/next/6-stdlib/99-minor/net/http/66343.md
Normal file
@@ -0,0 +1,16 @@
|
||||
[ServeContent], [ServeFile], and [ServeFileFS] now remove
|
||||
the `Cache-Control`, `Content-Encoding`, `Etag`, and `Last-Modified`
|
||||
headers when serving an error. These headers usually apply to the
|
||||
non-error content, but not to the text of errors.
|
||||
|
||||
Middleware which wraps a [ResponseWriter] and applies on-the-fly
|
||||
encoding, such as `Content-Encoding: gzip`, will not function after
|
||||
this change. The previous behavior of [ServeContent], [ServeFile],
|
||||
and [ServeFileFS] may be restored by setting
|
||||
`GODEBUG=httpservecontentkeepheaders=1`.
|
||||
|
||||
Note that middleware which changes the size of the served content
|
||||
(such as by compressing it) already does not function properly when
|
||||
[ServeContent] handles a Range request. On-the-fly compression
|
||||
should use the `Transfer-Encoding` header instead of `Content-Encoding`.
|
||||
|
||||
3
doc/next/6-stdlib/99-minor/net/http/66405.md
Normal file
3
doc/next/6-stdlib/99-minor/net/http/66405.md
Normal file
@@ -0,0 +1,3 @@
|
||||
For inbound requests, the new [Request.Pattern] field contains the [ServeMux]
|
||||
pattern (if any) that matched the request. This field is not set when
|
||||
`GODEBUG=httpmuxgo121=1` is set.
|
||||
2
doc/next/6-stdlib/99-minor/net/http/httptest/59473.md
Normal file
2
doc/next/6-stdlib/99-minor/net/http/httptest/59473.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The new [NewRequestWithContext] method creates an incoming request with
|
||||
a [context.Context].
|
||||
3
doc/next/6-stdlib/99-minor/os/33357.md
Normal file
3
doc/next/6-stdlib/99-minor/os/33357.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The [Stat] function now sets the [ModeSocket] bit for
|
||||
files that are Unix sockets on Windows. These files are identified
|
||||
by having a reparse tag set to `IO_REPARSE_TAG_AF_UNIX`.
|
||||
7
doc/next/6-stdlib/99-minor/os/61893.md
Normal file
7
doc/next/6-stdlib/99-minor/os/61893.md
Normal file
@@ -0,0 +1,7 @@
|
||||
On Windows, the mode bits reported by [Lstat] and [Stat] for
|
||||
reparse points changed. Mount points no longer have [ModeSymlink] set,
|
||||
and reparse points that are not symlinks, Unix sockets, or dedup files
|
||||
now always have [ModeIrregular] set.
|
||||
This behavior is controlled by the `winsymlink` setting.
|
||||
For Go 1.23, it defaults to `winsymlink=1`.
|
||||
Previous versions default to `winsymlink=0`.
|
||||
1
doc/next/6-stdlib/99-minor/os/62484.md
Normal file
1
doc/next/6-stdlib/99-minor/os/62484.md
Normal file
@@ -0,0 +1 @@
|
||||
The [CopyFS] function copies an [io/fs.FS] into the local filesystem.
|
||||
5
doc/next/6-stdlib/99-minor/os/63703.md
Normal file
5
doc/next/6-stdlib/99-minor/os/63703.md
Normal file
@@ -0,0 +1,5 @@
|
||||
On Windows, [Readlink] no longer tries to normalize volumes
|
||||
to drive letters, which was not always even possible.
|
||||
This behavior is controlled by the `winreadlinkvolume` setting.
|
||||
For Go 1.23, it defaults to `winreadlinkvolume=1`.
|
||||
Previous versions default to `winreadlinkvolume=0`.
|
||||
2
doc/next/6-stdlib/99-minor/path/filepath/57151.md
Normal file
2
doc/next/6-stdlib/99-minor/path/filepath/57151.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The new [Localize] function safely converts a slash-separated
|
||||
path into an operating system path.
|
||||
11
doc/next/6-stdlib/99-minor/path/filepath/63703.md
Normal file
11
doc/next/6-stdlib/99-minor/path/filepath/63703.md
Normal file
@@ -0,0 +1,11 @@
|
||||
On Windows, [EvalSymlinks] no longer evaluates mount points,
|
||||
which was a source of many inconsistencies and bugs.
|
||||
This behavior is controlled by the `winsymlink` setting.
|
||||
For Go 1.23, it defaults to `winsymlink=1`.
|
||||
Previous versions default to `winsymlink=0`.
|
||||
|
||||
On Windows, [EvalSymlinks] no longer tries to normalize
|
||||
volumes to drive letters, which was not always even possible.
|
||||
This behavior is controlled by the `winreadlinkvolume` setting.
|
||||
For Go 1.23, it defaults to `winreadlinkvolume=1`.
|
||||
Previous versions default to `winreadlinkvolume=0`.
|
||||
6
doc/next/6-stdlib/99-minor/reflect/60427.md
Normal file
6
doc/next/6-stdlib/99-minor/reflect/60427.md
Normal file
@@ -0,0 +1,6 @@
|
||||
The new methods synonymous with the method of the same name
|
||||
in [Value] are added to [Type]:
|
||||
1. [Type.OverflowComplex]
|
||||
2. [Type.OverflowFloat]
|
||||
3. [Type.OverflowInt]
|
||||
4. [Type.OverflowUint]
|
||||
3
doc/next/6-stdlib/99-minor/reflect/61308.md
Normal file
3
doc/next/6-stdlib/99-minor/reflect/61308.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The new [SliceAt] function is analogous to [NewAt], but for slices.
|
||||
|
||||
The [Value.Pointer] and [Value.UnsafePointer] methods now support values of kind [String].
|
||||
4
doc/next/6-stdlib/99-minor/reflect/66056.md
Normal file
4
doc/next/6-stdlib/99-minor/reflect/66056.md
Normal file
@@ -0,0 +1,4 @@
|
||||
The new methods [Value.Seq] and [Value.Seq2] return sequences that iterate over the value
|
||||
as though it were used in a for/range loop.
|
||||
The new methods [Type.CanSeq] and [Type.CanSeq2] report whether calling
|
||||
[Value.Seq] and [Value.Seq2], respectively, will succeed without panicking.
|
||||
5
doc/next/6-stdlib/99-minor/runtime/debug/42888.md
Normal file
5
doc/next/6-stdlib/99-minor/runtime/debug/42888.md
Normal file
@@ -0,0 +1,5 @@
|
||||
The [SetCrashOutput] function allows the user to specify an alternate
|
||||
file to which the runtime should write its fatal crash report.
|
||||
It may be used to construct an automated reporting mechanism for all
|
||||
unexpected crashes, not just those in goroutines that explicitly use
|
||||
`recover`.
|
||||
1
doc/next/6-stdlib/99-minor/runtime/debug/67182.md
Normal file
1
doc/next/6-stdlib/99-minor/runtime/debug/67182.md
Normal file
@@ -0,0 +1 @@
|
||||
<!-- pacify TestCheckAPIFragments -->
|
||||
2
doc/next/6-stdlib/99-minor/runtime/pprof/43669.md
Normal file
2
doc/next/6-stdlib/99-minor/runtime/pprof/43669.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The maximum stack depth for alloc, mutex, block, threadcreate and goroutine
|
||||
profiles has been raised from 32 to 128 frames.
|
||||
4
doc/next/6-stdlib/99-minor/runtime/trace/65319.md
Normal file
4
doc/next/6-stdlib/99-minor/runtime/trace/65319.md
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- go.dev/issue/65319 -->
|
||||
The runtime now explicitly flushes trace data when a program crashes due to an
|
||||
uncaught panic. This means that more complete trace data will be available in a
|
||||
trace if the program crashes while tracing is active.
|
||||
1
doc/next/6-stdlib/99-minor/slices/53987.md
Normal file
1
doc/next/6-stdlib/99-minor/slices/53987.md
Normal file
@@ -0,0 +1 @@
|
||||
<!-- see ../../3-iter.md -->
|
||||
1
doc/next/6-stdlib/99-minor/slices/61899.md
Normal file
1
doc/next/6-stdlib/99-minor/slices/61899.md
Normal file
@@ -0,0 +1 @@
|
||||
<!-- see ../../3-iter.md -->
|
||||
2
doc/next/6-stdlib/99-minor/slices/65238.md
Normal file
2
doc/next/6-stdlib/99-minor/slices/65238.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The [Repeat] function returns a new slice that repeats the
|
||||
provided slice the given number of times.
|
||||
1
doc/next/6-stdlib/99-minor/structs/66408.md
Normal file
1
doc/next/6-stdlib/99-minor/structs/66408.md
Normal file
@@ -0,0 +1 @@
|
||||
<!-- This is a new package; covered in 6-stdlib/3-structs.md. -->
|
||||
2
doc/next/6-stdlib/99-minor/sync/61696.md
Normal file
2
doc/next/6-stdlib/99-minor/sync/61696.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The [Map.Clear] method deletes all the entries, resulting in
|
||||
an empty [Map]. It is analogous to `clear`.
|
||||
3
doc/next/6-stdlib/99-minor/sync/atomic/61395.md
Normal file
3
doc/next/6-stdlib/99-minor/sync/atomic/61395.md
Normal file
@@ -0,0 +1,3 @@
|
||||
<!-- Issue #61395 -->
|
||||
The new [And] and [Or] operators apply a bitwise `AND` or `OR` to
|
||||
the given input, returning the old value.
|
||||
1
doc/next/6-stdlib/99-minor/syscall/62254.md
Normal file
1
doc/next/6-stdlib/99-minor/syscall/62254.md
Normal file
@@ -0,0 +1 @@
|
||||
The syscall package now defines [WSAENOPROTOOPT] on Windows.
|
||||
1
doc/next/6-stdlib/99-minor/syscall/65817.md
Normal file
1
doc/next/6-stdlib/99-minor/syscall/65817.md
Normal file
@@ -0,0 +1 @@
|
||||
The [GetsockoptInt] function is now supported on Windows.
|
||||
3
doc/next/6-stdlib/99-minor/testing/fstest/63675.md
Normal file
3
doc/next/6-stdlib/99-minor/testing/fstest/63675.md
Normal file
@@ -0,0 +1,3 @@
|
||||
[TestFS] now returns a structured error that can be unwrapped
|
||||
(via method `Unwrap() []error`). This allows inspecting errors
|
||||
using [errors.Is] or [errors.As].
|
||||
1
doc/next/6-stdlib/99-minor/text/template/57646.md
Normal file
1
doc/next/6-stdlib/99-minor/text/template/57646.md
Normal file
@@ -0,0 +1 @@
|
||||
Templates now support the new "else with" action, which reduces template complexity in some use cases.
|
||||
2
doc/next/6-stdlib/99-minor/time/67470.md
Normal file
2
doc/next/6-stdlib/99-minor/time/67470.md
Normal file
@@ -0,0 +1,2 @@
|
||||
[Parse] and [ParseInLocation] now return an error if the time zone
|
||||
offset is out of range.
|
||||
3
doc/next/6-stdlib/99-minor/unicode/utf16/44940.md
Normal file
3
doc/next/6-stdlib/99-minor/unicode/utf16/44940.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The [RuneLen] function returns the number of 16-bit words in
|
||||
the UTF-16 encoding of the rune. It returns -1 if the rune
|
||||
is not a valid value to encode in UTF-16.
|
||||
1
doc/next/6-stdlib/99-minor/unique/62483.md
Normal file
1
doc/next/6-stdlib/99-minor/unique/62483.md
Normal file
@@ -0,0 +1 @@
|
||||
<!-- This is a new package; covered in 6-stdlib/2-unique.md. -->
|
||||
38
doc/next/7-ports.md
Normal file
38
doc/next/7-ports.md
Normal file
@@ -0,0 +1,38 @@
|
||||
## Ports {#ports}
|
||||
|
||||
### Darwin {#darwin}
|
||||
|
||||
<!-- go.dev/issue/64207 -->
|
||||
As [announced](go1.22#darwin) in the Go 1.22 release notes,
|
||||
Go 1.23 requires macOS 11 Big Sur or later;
|
||||
support for previous versions has been discontinued.
|
||||
|
||||
### Linux {#linux}
|
||||
|
||||
<!-- go.dev/issue/67001 -->
|
||||
Go 1.23 is the last release that requires Linux kernel version 2.6.32 or later. Go 1.24 will require Linux kernel version 3.17 or later, with an exception that systems running 3.10 or later will continue to be supported if the kernel has been patched to support the getrandom system call.
|
||||
|
||||
### OpenBSD {#openbsd}
|
||||
|
||||
<!-- go.dev/issue/55999, CL 518629, CL 518630 -->
|
||||
Go 1.23 adds experimental support for OpenBSD on 64-bit RISC-V (`GOOS=openbsd`, `GOARCH=riscv64`).
|
||||
|
||||
### ARM64 {#arm64}
|
||||
|
||||
<!-- go.dev/issue/60905, CL 559555 -->
|
||||
Go 1.23 introduces a new `GOARM64` environment variable, which specifies the minimum target version of the ARM64 architecture at compile time. Allowed values are `v8.{0-9}` and `v9.{0-5}`. This may be followed by an option specifying extensions implemented by target hardware. Valid options are `,lse` and `,crypto`.
|
||||
|
||||
The `GOARM64` environment variable defaults to `v8.0`.
|
||||
|
||||
### RISC-V {#riscv}
|
||||
|
||||
<!-- go.dev/issue/61476, CL 541135 -->
|
||||
Go 1.23 introduces a new `GORISCV64` environment variable, which selects the [RISC-V user-mode application profile](https://github.com/riscv/riscv-profiles/blob/main/src/profiles.adoc) for which to compile. Allowed values are `rva20u64` and `rva22u64`.
|
||||
|
||||
The `GORISCV64` environment variable defaults to `rva20u64`.
|
||||
|
||||
### Wasm {#wasm}
|
||||
|
||||
<!-- go.dev/issue/63718 -->
|
||||
The `go_wasip1_wasm_exec` script in `GOROOT/misc/wasm` has dropped support
|
||||
for versions of `wasmtime` < 14.0.0.
|
||||
51
doc/next/9-todo.md
Normal file
51
doc/next/9-todo.md
Normal file
@@ -0,0 +1,51 @@
|
||||
<!-- These items need to be completed and moved to an appropriate location in the release notes. -->
|
||||
|
||||
<!-- These items need to be reviewed, and mentioned in the Go 1.23 release notes if applicable.
|
||||
|
||||
None right now; more may come up later on.
|
||||
-->
|
||||
|
||||
<!-- Maybe should be documented? Maybe shouldn't? Someone familiar with the change needs to determine.
|
||||
|
||||
CL 359594 ("x/website/_content/ref/mod: document dotless module paths") - resolved go.dev/issue/32819 ("cmd/go: document that module names without dots are reserved") and also mentioned accepted proposal go.dev/issue/37641
|
||||
CL 570681 ("os: make FindProcess use pidfd on Linux") mentions accepted proposal go.dev/issue/51246 (described as fully implemented in Go 1.22) and NeedsInvestigation continuation issue go.dev/issue/62654.
|
||||
CL 555075 ("x/tools/go/ssa: support range-over-func") - x/tools CL implements range-over-func support in x/tools/go/ssa for accepted proposal https://go.dev/issue/66601; this particular proposal and change doesn't seem to need a dedicated mention in Go 1.23 release notes but someone more familiar should take another look
|
||||
-->
|
||||
|
||||
<!-- Items that don't need to be mentioned in Go 1.23 release notes but are picked up by relnote todo.
|
||||
|
||||
CL 458895 - an x/playground fix that mentioned an accepted cmd/go proposal go.dev/issue/40728 in Go 1.16 milestone...
|
||||
CL 582097 - an x/build CL working on relnote itself; it doesn't need a release note
|
||||
CL 561935 - crypto CL that used purego tag and mentioned accepted-but-not-implemented proposal https://go.dev/issue/23172 to document purego tag; doesn't need a release note
|
||||
CL 568340 - fixed a spurious race in time.Ticker.Reset (added via accepted proposal https://go.dev/issue/33184), doesn't seem to need a release note
|
||||
CL 562619 - x/website CL documented minimum bootstrap version on go.dev, mentioning accepted proposals go.dev/issue/54265 and go.dev/issue/44505; doesn't need a release note
|
||||
CL 557055 - x/tools CL implemented accepted proposal https://go.dev/issue/46941 for x/tools/go/ssa
|
||||
CL 564275 - an x/tools CL that updates test data in preparation for accepted proposal https://go.dev/issue/51473; said proposal isn't implemented for Go 1.23 and so it doesn't need a release note
|
||||
CL 572535 - used "unix" build tag in more places, mentioned accepted proposal https://go.dev/issue/51572; doesn't need a release note
|
||||
CL 555255 - an x/tools CL implements accepted proposal https://go.dev/issue/53367 for x/tools/go/cfg
|
||||
CL 585216 - an x/build CL mentions accepted proposal https://go.dev/issue/56001 because it fixed a bug causing downloads not to be produced for that new-to-Go-1.22 port; this isn't relevant to Go 1.23 release notes
|
||||
CL 481062 - added examples for accepted proposal https://go.dev/issue/56102; doesn't need a release note
|
||||
CL 497195 - an x/net CL adds one of 4 fields for accepted proposal https://go.dev/issue/57893 in x/net/http2; seemingly not related to net/http and so doesn't need a Go 1.23 release note
|
||||
CL 463097, CL 568198 - x/net CLs that implemented accepted proposal https://go.dev/issue/57953 for x/net/websocket; no need for rel note
|
||||
many x/net CLs - work on accepted proposal https://go.dev/issue/58547 to add a QUIC implementation to x/net/quic
|
||||
CL 514775 - implements a performance optimization for accepted proposal https://go.dev/issue/59488
|
||||
CL 484995 - x/sys CL implements accepted proposal https://go.dev/issue/59537 to add x/sys/unix API
|
||||
CL 555597 - optimizes TypeFor (added in accepted proposal https://go.dev/issue/60088) for non-interface types; doesn't seem to need a release note
|
||||
a few x/tools CLs deprecated and deleted the experimental golang.org/x/tools/cmd/getgo tool per accepted proposal https://go.dev/issue/60951; an unreleased change and not something that's in scope of Go 1.23 release notes
|
||||
many x/vuln CLs to implement accepted proposal https://go.dev/issue/61347 ("x/vuln: convert govulncheck output to sarif format") in govulncheck
|
||||
CL 516355 - x/crypto CL that implemented accepted proposal https://go.dev/issue/61447 for x/crypto/ssh; doesn't need a Go 1.23 release note
|
||||
CL 559799 - a Go 1.22 release note edit CL mentioned a Go 1.22 accepted proposal https://go.dev/issue/62039, a little after Go 1.23 development began
|
||||
CL 581555 - an x/tools CL mentioned accepted proposal https://go.dev/issue/62292 for x/tools/go/aalysis; doesn't need a Go 1.23 release note
|
||||
CL 578355 - mentioned accepted proposal https://go.dev/issue/63131 to add GOARCH=wasm32, but that proposal hasn't been implemented in Go 1.23 so it doesn't need a release note
|
||||
CL 543335 - x/exp CL that backported a change to behavior in slices package (accepted proposal https://go.dev/issue/63393) to x/exp/slices; doesn't need a Go 1.23 release note
|
||||
CL 556820 - x/tools CL implemented accepted proposal https://go.dev/issue/64548 for x/tools/go/analysis
|
||||
CL 557056 - x/tools CL implemented accepted proposal https://go.dev/issue/64608 for x/tools/go/packages
|
||||
CL 558695 - x/crypto CL worked on accepted proposal https://go.dev/issue/64962 for x/crypto/ssh
|
||||
CL 572016 - x/tools CL implemented accepted proposal https://go.dev/issue/65754 for x/tools/go/cfg
|
||||
a few x/tools CLs tagged and deleted the golang.org/x/tools/cmd/guru command per accepted proposal https://go.dev/issue/65880; an unreleased change and not something that's in scope of Go 1.23 release notes
|
||||
CL 580076 - seemingly internal cmd/go change to propagate module information for accepted proposal https://go.dev/issue/66315; doesn't seem to warrant a release note
|
||||
CL 529816 - the 'tests' vet check was initially added to the 'go test' suite per accepted proposal https://go.dev/issue/44251, but the change was rolled back in CL 571695, with no roll forward as of 2024-05-23; nothing to document in Go 1.23 release notes for it at this time
|
||||
CL 564035 - changed encoding/xml, but the change was too disrptive and rolled back in CL 570175, reopening tracking issue go.dev/issue/65691; nothing to document in Go 1.23 release notes
|
||||
CL 587855 - a demonstration of benefit of accepted proposal https://go.dev/issue/60529; actual change isn't happening in Go 1.23 so doesn't need a release note
|
||||
CL 526875 - x/crypto CL implemented accepted proposal https://go.dev/issue/62518 for x/crypto/ssh
|
||||
-->
|
||||
@@ -1,46 +0,0 @@
|
||||
# Copyright 2024 The Go Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
# Rules for building and testing new FIPS snapshots.
|
||||
# For example:
|
||||
#
|
||||
# make v1.2.3.zip
|
||||
# make v1.2.3.test
|
||||
#
|
||||
# and then if changes are needed, check them into master
|
||||
# and run 'make v1.2.3.rm' and repeat.
|
||||
#
|
||||
# Note that once published a snapshot zip file should never
|
||||
# be modified. We record the sha256 hashes of the zip files
|
||||
# in fips140.sum, and the cmd/go/internal/fips140 test checks
|
||||
# that the zips match.
|
||||
#
|
||||
# When the zip file is finalized, run 'make updatesum' to update
|
||||
# fips140.sum.
|
||||
|
||||
default:
|
||||
@echo nothing to make
|
||||
|
||||
# make v1.2.3.zip builds a v1.2.3.zip file
|
||||
# from the current origin/master.
|
||||
# copy and edit the 'go run' command by hand to use a different branch.
|
||||
v%.zip:
|
||||
git fetch origin master
|
||||
go run ../../src/cmd/go/internal/fips140/mkzip.go -b master v$*
|
||||
|
||||
# normally mkzip refuses to overwrite an existing zip file.
|
||||
# make v1.2.3.rm removes the zip file and and unpacked
|
||||
# copy from the module cache.
|
||||
v%.rm:
|
||||
rm -f v$*.zip
|
||||
chmod -R u+w $$(go env GOMODCACHE)/golang.org/fips140@v$* 2>/dev/null || true
|
||||
rm -rf $$(go env GOMODCACHE)/golang.org/fips140@v$*
|
||||
|
||||
# make v1.2.3.test runs the crypto tests using that snapshot.
|
||||
v%.test:
|
||||
GOFIPS140=v$* go test -short crypto...
|
||||
|
||||
# make updatesum updates the fips140.sum file.
|
||||
updatesum:
|
||||
go test cmd/go/internal/fips140 -update
|
||||
@@ -1,9 +0,0 @@
|
||||
This directory holds snapshots of the crypto/internal/fips140 tree
|
||||
that are being validated and certified for FIPS-140 use.
|
||||
The file x.txt (for example, inprocess.txt, certified.txt)
|
||||
defines the meaning of the FIPS version alias x, listing
|
||||
the exact version to use.
|
||||
|
||||
The zip files are created by cmd/go/internal/fips140/mkzip.go.
|
||||
The fips140.sum file lists checksums for the zip files.
|
||||
See the Makefile for recipes.
|
||||
@@ -1,11 +0,0 @@
|
||||
# SHA256 checksums of snapshot zip files in this directory.
|
||||
# These checksums are included in the FIPS security policy
|
||||
# (validation instructions sent to the lab) and MUST NOT CHANGE.
|
||||
# That is, the zip files themselves must not change.
|
||||
#
|
||||
# It is okay to add new zip files to the list, and it is okay to
|
||||
# remove zip files from the list when they are removed from
|
||||
# this directory. To update this file:
|
||||
#
|
||||
# go test cmd/go/internal/fips140 -update
|
||||
#
|
||||
@@ -24,8 +24,8 @@
|
||||
# in the CL match the update.bash in the CL.
|
||||
|
||||
# Versions to use.
|
||||
CODE=2024b
|
||||
DATA=2024b
|
||||
CODE=2024a
|
||||
DATA=2024a
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
Binary file not shown.
@@ -17,7 +17,7 @@ license that can be found in the LICENSE file.
|
||||
<script src="https://cdn.jsdelivr.net/npm/text-encoding@0.7.0/lib/encoding.min.js"></script>
|
||||
(see https://caniuse.com/#feat=textencoder)
|
||||
-->
|
||||
<script src="../../lib/wasm/wasm_exec.js"></script>
|
||||
<script src="wasm_exec.js"></script>
|
||||
<script>
|
||||
if (!WebAssembly.instantiateStreaming) { // polyfill
|
||||
WebAssembly.instantiateStreaming = async (resp, importObject) => {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if (!globalThis.fs) {
|
||||
let outputBuf = "";
|
||||
globalThis.fs = {
|
||||
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1, O_DIRECTORY: -1 }, // unused
|
||||
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
|
||||
writeSync(fd, buf) {
|
||||
outputBuf += decoder.decode(buf);
|
||||
const nl = outputBuf.lastIndexOf("\n");
|
||||
@@ -73,14 +73,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (!globalThis.path) {
|
||||
globalThis.path = {
|
||||
resolve(...pathSegments) {
|
||||
return pathSegments.join("/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!globalThis.crypto) {
|
||||
throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");
|
||||
}
|
||||
@@ -216,16 +208,10 @@
|
||||
return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));
|
||||
}
|
||||
|
||||
const testCallExport = (a, b) => {
|
||||
this._inst.exports.testExport0();
|
||||
return this._inst.exports.testExport(a, b);
|
||||
}
|
||||
|
||||
const timeOrigin = Date.now() - performance.now();
|
||||
this.importObject = {
|
||||
_gotest: {
|
||||
add: (a, b) => a + b,
|
||||
callExport: testCallExport,
|
||||
},
|
||||
gojs: {
|
||||
// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)
|
||||
@@ -11,7 +11,6 @@ if (process.argv.length < 3) {
|
||||
|
||||
globalThis.require = require;
|
||||
globalThis.fs = require("fs");
|
||||
globalThis.path = require("path");
|
||||
globalThis.TextEncoder = require("util").TextEncoder;
|
||||
globalThis.TextDecoder = require("util").TextDecoder;
|
||||
|
||||
@@ -33,10 +33,6 @@ Before updating vendor directories, ensure that module mode is enabled.
|
||||
Make sure that GO111MODULE is not set in the environment, or that it is
|
||||
set to 'on' or 'auto', and if you use a go.work file, set GOWORK=off.
|
||||
|
||||
Also, ensure that 'go env GOROOT' shows the root of this Go source
|
||||
tree. Otherwise, the results are undefined. It's recommended to build
|
||||
Go from source and use that 'go' binary to update its source tree.
|
||||
|
||||
Requirements may be added, updated, and removed with 'go get'.
|
||||
The vendor directory may be updated with 'go mod vendor'.
|
||||
A typical sequence might be:
|
||||
|
||||
@@ -15,7 +15,6 @@ import (
|
||||
"fmt"
|
||||
"internal/godebug"
|
||||
"io/fs"
|
||||
"maps"
|
||||
"math"
|
||||
"path"
|
||||
"reflect"
|
||||
@@ -697,14 +696,24 @@ func FileInfoHeader(fi fs.FileInfo, link string) (*Header, error) {
|
||||
h.Gname = sys.Gname
|
||||
h.AccessTime = sys.AccessTime
|
||||
h.ChangeTime = sys.ChangeTime
|
||||
h.Xattrs = maps.Clone(sys.Xattrs)
|
||||
if sys.Xattrs != nil {
|
||||
h.Xattrs = make(map[string]string)
|
||||
for k, v := range sys.Xattrs {
|
||||
h.Xattrs[k] = v
|
||||
}
|
||||
}
|
||||
if sys.Typeflag == TypeLink {
|
||||
// hard link
|
||||
h.Typeflag = TypeLink
|
||||
h.Size = 0
|
||||
h.Linkname = sys.Linkname
|
||||
}
|
||||
h.PAXRecords = maps.Clone(sys.PAXRecords)
|
||||
if sys.PAXRecords != nil {
|
||||
h.PAXRecords = make(map[string]string)
|
||||
for k, v := range sys.PAXRecords {
|
||||
h.PAXRecords[k] = v
|
||||
}
|
||||
}
|
||||
}
|
||||
var doNameLookups = true
|
||||
if iface, ok := fi.(FileInfoNames); ok {
|
||||
|
||||
@@ -7,16 +7,14 @@ package tar
|
||||
import (
|
||||
"bytes"
|
||||
"compress/bzip2"
|
||||
"crypto/md5"
|
||||
"errors"
|
||||
"fmt"
|
||||
"hash/crc32"
|
||||
"io"
|
||||
"maps"
|
||||
"math"
|
||||
"os"
|
||||
"path"
|
||||
"reflect"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -27,7 +25,7 @@ func TestReader(t *testing.T) {
|
||||
vectors := []struct {
|
||||
file string // Test input file
|
||||
headers []*Header // Expected output headers
|
||||
chksums []string // CRC32 checksum of files, leave as nil if not checked
|
||||
chksums []string // MD5 checksum of files, leave as nil if not checked
|
||||
err error // Expected error to occur
|
||||
}{{
|
||||
file: "testdata/gnu.tar",
|
||||
@@ -55,8 +53,8 @@ func TestReader(t *testing.T) {
|
||||
Format: FormatGNU,
|
||||
}},
|
||||
chksums: []string{
|
||||
"6cbd88fc",
|
||||
"ddac04b3",
|
||||
"e38b27eaccb4391bdec553a7f3ae6b2f",
|
||||
"c65bd2e50a56a2138bf1716f2fd56fe9",
|
||||
},
|
||||
}, {
|
||||
file: "testdata/sparse-formats.tar",
|
||||
@@ -149,11 +147,11 @@ func TestReader(t *testing.T) {
|
||||
Format: FormatGNU,
|
||||
}},
|
||||
chksums: []string{
|
||||
"5375e1d2",
|
||||
"5375e1d2",
|
||||
"5375e1d2",
|
||||
"5375e1d2",
|
||||
"8eb179ba",
|
||||
"6f53234398c2449fe67c1812d993012f",
|
||||
"6f53234398c2449fe67c1812d993012f",
|
||||
"6f53234398c2449fe67c1812d993012f",
|
||||
"6f53234398c2449fe67c1812d993012f",
|
||||
"b0061974914468de549a2af8ced10316",
|
||||
},
|
||||
}, {
|
||||
file: "testdata/star.tar",
|
||||
@@ -270,7 +268,7 @@ func TestReader(t *testing.T) {
|
||||
Format: FormatPAX,
|
||||
}},
|
||||
chksums: []string{
|
||||
"5fd7e86a",
|
||||
"0afb597b283fe61b5d4879669a350556",
|
||||
},
|
||||
}, {
|
||||
file: "testdata/pax-records.tar",
|
||||
@@ -657,7 +655,7 @@ func TestReader(t *testing.T) {
|
||||
if v.chksums == nil {
|
||||
continue
|
||||
}
|
||||
h := crc32.NewIEEE()
|
||||
h := md5.New()
|
||||
_, err = io.CopyBuffer(h, tr, rdbuf) // Effectively an incremental read
|
||||
if err != nil {
|
||||
break
|
||||
@@ -1019,7 +1017,7 @@ func TestParsePAX(t *testing.T) {
|
||||
for i, v := range vectors {
|
||||
r := strings.NewReader(v.in)
|
||||
got, err := parsePAX(r)
|
||||
if !maps.Equal(got, v.want) && !(len(got) == 0 && len(v.want) == 0) {
|
||||
if !reflect.DeepEqual(got, v.want) && !(len(got) == 0 && len(v.want) == 0) {
|
||||
t.Errorf("test %d, parsePAX():\ngot %v\nwant %v", i, got, v.want)
|
||||
}
|
||||
if ok := err == nil; ok != v.ok {
|
||||
@@ -1136,7 +1134,7 @@ func TestReadOldGNUSparseMap(t *testing.T) {
|
||||
v.input = v.input[copy(blk[:], v.input):]
|
||||
tr := Reader{r: bytes.NewReader(v.input)}
|
||||
got, err := tr.readOldGNUSparseMap(&hdr, &blk)
|
||||
if !slices.Equal(got, v.wantMap) {
|
||||
if !equalSparseEntries(got, v.wantMap) {
|
||||
t.Errorf("test %d, readOldGNUSparseMap(): got %v, want %v", i, got, v.wantMap)
|
||||
}
|
||||
if err != v.wantErr {
|
||||
@@ -1327,7 +1325,7 @@ func TestReadGNUSparsePAXHeaders(t *testing.T) {
|
||||
r := strings.NewReader(v.inputData + "#") // Add canary byte
|
||||
tr := Reader{curr: ®FileReader{r, int64(r.Len())}}
|
||||
got, err := tr.readGNUSparsePAXHeaders(&hdr)
|
||||
if !slices.Equal(got, v.wantMap) {
|
||||
if !equalSparseEntries(got, v.wantMap) {
|
||||
t.Errorf("test %d, readGNUSparsePAXHeaders(): got %v, want %v", i, got, v.wantMap)
|
||||
}
|
||||
if err != v.wantErr {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user