mirror of
https://github.com/golang/go
synced 2024-11-23 23:10:09 -07:00
Merge branch 'master' into master-syslibargsworkaround
This commit is contained in:
commit
4a38cb0f9d
2
.github/ISSUE_TEMPLATE/03-gopls.yml
vendored
2
.github/ISSUE_TEMPLATE/03-gopls.yml
vendored
@ -6,7 +6,7 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Please answer these questions before submitting your issue. Thanks!"
|
||||
- type: input
|
||||
- type: textarea
|
||||
id: gopls-version
|
||||
attributes:
|
||||
label: "gopls version"
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: Language Change Proposals
|
||||
description: Changes to the language
|
||||
labels: ["Proposal", "v2", "LanguageChange"]
|
||||
title: "proposal: Go 2: proposal title"
|
||||
labels: ["Proposal", "LanguageChange", "LanguageChangeReview"]
|
||||
title: "proposal: spec: 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/runtime/internal/sys/zversion.go
|
||||
/src/internal/runtime/sys/zversion.go
|
||||
/src/unicode/maketables
|
||||
/src/time/tzdata/zzipdata.go
|
||||
/test.out
|
||||
|
4
LICENSE
4
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||
Copyright 2009 The Go Authors.
|
||||
|
||||
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 Inc. nor the names of its
|
||||
* Neither the name of Google LLC 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](https://golang.org/doc/gopher/fiveyears.jpg)
|
||||
*Gopher image by [Renee French][rf], licensed under [Creative Commons 4.0 Attributions license][cc4-by].*
|
||||
*Gopher image by [Renee French][rf], licensed under [Creative Commons 4.0 Attribution 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.
|
||||
|
@ -598,3 +598,7 @@ pkg syscall (freebsd-arm64-cgo), const SYS_MKNODAT = 498
|
||||
pkg syscall (freebsd-arm64-cgo), const SYS_STAT = 188
|
||||
pkg syscall (freebsd-arm64-cgo), const SYS_STAT ideal-int
|
||||
pkg syscall (freebsd-arm64-cgo), const SYS_STATFS = 396
|
||||
pkg syscall (openbsd-386), const ELAST = 91
|
||||
pkg syscall (openbsd-386-cgo), const ELAST = 91
|
||||
pkg syscall (openbsd-amd64), const ELAST = 91
|
||||
pkg syscall (openbsd-amd64-cgo), const ELAST = 91
|
||||
|
158
api/go1.23.txt
Normal file
158
api/go1.23.txt
Normal file
@ -0,0 +1,158 @@
|
||||
pkg archive/tar, type FileInfoNames interface { Gname, IsDir, ModTime, Mode, Name, Size, Sys, Uname } #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Gname() (string, error) #50102
|
||||
pkg archive/tar, type FileInfoNames interface, IsDir() bool #50102
|
||||
pkg archive/tar, type FileInfoNames interface, ModTime() time.Time #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Mode() fs.FileMode #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Name() string #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Size() int64 #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Sys() interface{} #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Uname() (string, error) #50102
|
||||
pkg crypto/tls, const QUICResumeSession = 8 #63691
|
||||
pkg crypto/tls, const QUICResumeSession QUICEventKind #63691
|
||||
pkg crypto/tls, const QUICStoreSession = 9 #63691
|
||||
pkg crypto/tls, const QUICStoreSession QUICEventKind #63691
|
||||
pkg crypto/tls, method (*ECHRejectionError) Error() string #63369
|
||||
pkg crypto/tls, method (*QUICConn) StoreSession(*SessionState) error #63691
|
||||
pkg crypto/tls, type Config struct, EncryptedClientHelloConfigList []uint8 #63369
|
||||
pkg crypto/tls, type Config struct, EncryptedClientHelloRejectionVerify func(ConnectionState) error #63369
|
||||
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 QUICEvent struct, SessionState *SessionState #63691
|
||||
pkg crypto/tls, type QUICSessionTicketOptions struct, Extra [][]uint8 #63691
|
||||
pkg crypto/x509, func ParseOID(string) (OID, error) #66249
|
||||
pkg crypto/x509, method (*OID) UnmarshalBinary([]uint8) error #66249
|
||||
pkg crypto/x509, method (*OID) UnmarshalText([]uint8) error #66249
|
||||
pkg crypto/x509, method (OID) MarshalBinary() ([]uint8, error) #66249
|
||||
pkg crypto/x509, method (OID) MarshalText() ([]uint8, error) #66249
|
||||
pkg debug/elf, const PT_OPENBSD_NOBTCFI = 1705237480 #66054
|
||||
pkg debug/elf, const PT_OPENBSD_NOBTCFI ProgType #66054
|
||||
pkg debug/elf, const STT_GNU_IFUNC = 10 #66836
|
||||
pkg debug/elf, const STT_GNU_IFUNC SymType #66836
|
||||
pkg debug/elf, const STT_RELC = 8 #66836
|
||||
pkg debug/elf, const STT_RELC SymType #66836
|
||||
pkg debug/elf, const STT_SRELC = 9 #66836
|
||||
pkg debug/elf, const STT_SRELC SymType #66836
|
||||
pkg encoding/binary, func Append([]uint8, ByteOrder, interface{}) ([]uint8, error) #60023
|
||||
pkg encoding/binary, func Decode([]uint8, ByteOrder, interface{}) (int, error) #60023
|
||||
pkg encoding/binary, func Encode([]uint8, ByteOrder, interface{}) (int, error) #60023
|
||||
pkg go/ast, func Preorder(Node) iter.Seq[Node] #66339
|
||||
pkg go/types, method (*Alias) Origin() *Alias #67143
|
||||
pkg go/types, method (*Alias) Rhs() Type #66559
|
||||
pkg go/types, method (*Alias) SetTypeParams([]*TypeParam) #67143
|
||||
pkg go/types, method (*Alias) TypeArgs() *TypeList #67143
|
||||
pkg go/types, method (*Alias) TypeParams() *TypeParamList #67143
|
||||
pkg go/types, method (*Func) Signature() *Signature #65772
|
||||
pkg iter, func Pull2[$0 interface{}, $1 interface{}](Seq2[$0, $1]) (func() ($0, $1, bool), func()) #61897
|
||||
pkg iter, func Pull[$0 interface{}](Seq[$0]) (func() ($0, bool), func()) #61897
|
||||
pkg iter, type Seq2[$0 interface{}, $1 interface{}] func(func($0, $1) bool) #61897
|
||||
pkg iter, type Seq[$0 interface{}] func(func($0) bool) #61897
|
||||
pkg maps, func All[$0 interface{ ~map[$1]$2 }, $1 comparable, $2 interface{}]($0) iter.Seq2[$1, $2] #61900
|
||||
pkg maps, func Collect[$0 comparable, $1 interface{}](iter.Seq2[$0, $1]) map[$0]$1 #61900
|
||||
pkg maps, func Insert[$0 interface{ ~map[$1]$2 }, $1 comparable, $2 interface{}]($0, iter.Seq2[$1, $2]) #61900
|
||||
pkg maps, func Keys[$0 interface{ ~map[$1]$2 }, $1 comparable, $2 interface{}]($0) iter.Seq[$1] #61900
|
||||
pkg maps, func Values[$0 interface{ ~map[$1]$2 }, $1 comparable, $2 interface{}]($0) iter.Seq[$2] #61900
|
||||
pkg math/rand/v2, func Uint() uint #61716
|
||||
pkg math/rand/v2, method (*ChaCha8) Read([]uint8) (int, error) #67059
|
||||
pkg math/rand/v2, method (*Rand) Uint() uint #61716
|
||||
pkg net, method (*DNSError) Unwrap() error #63116
|
||||
pkg net, method (*TCPConn) SetKeepAliveConfig(KeepAliveConfig) error #62254
|
||||
pkg net, type DNSError struct, UnwrapErr error #63116
|
||||
pkg net, type Dialer struct, KeepAliveConfig KeepAliveConfig #62254
|
||||
pkg net, type KeepAliveConfig struct #62254
|
||||
pkg net, type KeepAliveConfig struct, Count int #62254
|
||||
pkg net, type KeepAliveConfig struct, Enable bool #62254
|
||||
pkg net, type KeepAliveConfig struct, Idle time.Duration #62254
|
||||
pkg net, type KeepAliveConfig struct, Interval time.Duration #62254
|
||||
pkg net, type ListenConfig struct, KeepAliveConfig KeepAliveConfig #62254
|
||||
pkg net/http, func ParseCookie(string) ([]*Cookie, error) #66008
|
||||
pkg net/http, func ParseSetCookie(string) (*Cookie, error) #66008
|
||||
pkg net/http, method (*Request) CookiesNamed(string) []*Cookie #61472
|
||||
pkg net/http, type Cookie struct, Partitioned bool #62490
|
||||
pkg net/http, type Cookie struct, Quoted bool #46443
|
||||
pkg net/http, type Request struct, Pattern string #66405
|
||||
pkg net/http/httptest, func NewRequestWithContext(context.Context, string, string, io.Reader) *http.Request #59473
|
||||
pkg os, func CopyFS(string, fs.FS) error #62484
|
||||
pkg path/filepath, func Localize(string) (string, error) #57151
|
||||
pkg reflect, func SliceAt(Type, unsafe.Pointer, int) Value #61308
|
||||
pkg reflect, method (Value) Seq() iter.Seq[Value] #66056
|
||||
pkg reflect, method (Value) Seq2() iter.Seq2[Value, Value] #66056
|
||||
pkg reflect, type Type interface, CanSeq() bool #66056
|
||||
pkg reflect, type Type interface, CanSeq2() bool #66056
|
||||
pkg reflect, type Type interface, OverflowComplex(complex128) bool #60427
|
||||
pkg reflect, type Type interface, OverflowFloat(float64) bool #60427
|
||||
pkg reflect, type Type interface, OverflowInt(int64) bool #60427
|
||||
pkg reflect, type Type interface, OverflowUint(uint64) bool #60427
|
||||
pkg runtime/debug, func SetCrashOutput(*os.File, CrashOptions) error #42888
|
||||
pkg runtime/debug, type CrashOptions struct #67182
|
||||
pkg slices, func All[$0 interface{ ~[]$1 }, $1 interface{}]($0) iter.Seq2[int, $1] #61899
|
||||
pkg slices, func AppendSeq[$0 interface{ ~[]$1 }, $1 interface{}]($0, iter.Seq[$1]) $0 #61899
|
||||
pkg slices, func Backward[$0 interface{ ~[]$1 }, $1 interface{}]($0) iter.Seq2[int, $1] #61899
|
||||
pkg slices, func Chunk[$0 interface{ ~[]$1 }, $1 interface{}]($0, int) iter.Seq[$0] #53987
|
||||
pkg slices, func Collect[$0 interface{}](iter.Seq[$0]) []$0 #61899
|
||||
pkg slices, func Repeat[$0 interface{ ~[]$1 }, $1 interface{}]($0, int) $0 #65238
|
||||
pkg slices, func SortedFunc[$0 interface{}](iter.Seq[$0], func($0, $0) int) []$0 #61899
|
||||
pkg slices, func SortedStableFunc[$0 interface{}](iter.Seq[$0], func($0, $0) int) []$0 #61899
|
||||
pkg slices, func Sorted[$0 cmp.Ordered](iter.Seq[$0]) []$0 #61899
|
||||
pkg slices, func Values[$0 interface{ ~[]$1 }, $1 interface{}]($0) iter.Seq[$1] #61899
|
||||
pkg structs, type HostLayout struct #66408
|
||||
pkg sync, method (*Map) Clear() #61696
|
||||
pkg sync/atomic, func AndInt32(*int32, int32) int32 #61395
|
||||
pkg sync/atomic, func AndInt64(*int64, int64) int64 #61395
|
||||
pkg sync/atomic, func AndUint32(*uint32, uint32) uint32 #61395
|
||||
pkg sync/atomic, func AndUint64(*uint64, uint64) uint64 #61395
|
||||
pkg sync/atomic, func AndUintptr(*uintptr, uintptr) uintptr #61395
|
||||
pkg sync/atomic, func OrInt32(*int32, int32) int32 #61395
|
||||
pkg sync/atomic, func OrInt64(*int64, int64) int64 #61395
|
||||
pkg sync/atomic, func OrUint32(*uint32, uint32) uint32 #61395
|
||||
pkg sync/atomic, func OrUint64(*uint64, uint64) uint64 #61395
|
||||
pkg sync/atomic, func OrUintptr(*uintptr, uintptr) uintptr #61395
|
||||
pkg sync/atomic, method (*Int32) And(int32) int32 #61395
|
||||
pkg sync/atomic, method (*Int32) Or(int32) int32 #61395
|
||||
pkg sync/atomic, method (*Int64) And(int64) int64 #61395
|
||||
pkg sync/atomic, method (*Int64) Or(int64) int64 #61395
|
||||
pkg sync/atomic, method (*Uint32) And(uint32) uint32 #61395
|
||||
pkg sync/atomic, method (*Uint32) Or(uint32) uint32 #61395
|
||||
pkg sync/atomic, method (*Uint64) And(uint64) uint64 #61395
|
||||
pkg sync/atomic, method (*Uint64) Or(uint64) uint64 #61395
|
||||
pkg sync/atomic, method (*Uintptr) And(uintptr) uintptr #61395
|
||||
pkg sync/atomic, method (*Uintptr) Or(uintptr) uintptr #61395
|
||||
pkg syscall (openbsd-386), const EBADMSG = 92 #67998
|
||||
pkg syscall (openbsd-386), const ELAST = 95 #67998
|
||||
pkg syscall (openbsd-386), const ENOTRECOVERABLE = 93 #67998
|
||||
pkg syscall (openbsd-386), const ENOTRECOVERABLE Errno #67998
|
||||
pkg syscall (openbsd-386), const EOWNERDEAD = 94 #67998
|
||||
pkg syscall (openbsd-386), const EOWNERDEAD Errno #67998
|
||||
pkg syscall (openbsd-386), const EPROTO = 95 #67998
|
||||
pkg syscall (openbsd-386-cgo), const EBADMSG = 92 #67998
|
||||
pkg syscall (openbsd-386-cgo), const ELAST = 95 #67998
|
||||
pkg syscall (openbsd-386-cgo), const ENOTRECOVERABLE = 93 #67998
|
||||
pkg syscall (openbsd-386-cgo), const ENOTRECOVERABLE Errno #67998
|
||||
pkg syscall (openbsd-386-cgo), const EOWNERDEAD = 94 #67998
|
||||
pkg syscall (openbsd-386-cgo), const EOWNERDEAD Errno #67998
|
||||
pkg syscall (openbsd-386-cgo), const EPROTO = 95 #67998
|
||||
pkg syscall (openbsd-amd64), const EBADMSG = 92 #67998
|
||||
pkg syscall (openbsd-amd64), const ELAST = 95 #67998
|
||||
pkg syscall (openbsd-amd64), const ENOTRECOVERABLE = 93 #67998
|
||||
pkg syscall (openbsd-amd64), const ENOTRECOVERABLE Errno #67998
|
||||
pkg syscall (openbsd-amd64), const EOWNERDEAD = 94 #67998
|
||||
pkg syscall (openbsd-amd64), const EOWNERDEAD Errno #67998
|
||||
pkg syscall (openbsd-amd64), const EPROTO = 95 #67998
|
||||
pkg syscall (openbsd-amd64-cgo), const EBADMSG = 92 #67998
|
||||
pkg syscall (openbsd-amd64-cgo), const ELAST = 95 #67998
|
||||
pkg syscall (openbsd-amd64-cgo), const ENOTRECOVERABLE = 93 #67998
|
||||
pkg syscall (openbsd-amd64-cgo), const ENOTRECOVERABLE Errno #67998
|
||||
pkg syscall (openbsd-amd64-cgo), const EOWNERDEAD = 94 #67998
|
||||
pkg syscall (openbsd-amd64-cgo), const EOWNERDEAD Errno #67998
|
||||
pkg syscall (openbsd-amd64-cgo), const EPROTO = 95 #67998
|
||||
pkg syscall (windows-386), const WSAENOPROTOOPT = 10042 #62254
|
||||
pkg syscall (windows-386), const WSAENOPROTOOPT Errno #62254
|
||||
pkg syscall (windows-amd64), const WSAENOPROTOOPT = 10042 #62254
|
||||
pkg syscall (windows-amd64), const WSAENOPROTOOPT Errno #62254
|
||||
pkg syscall, const EBADMSG Errno #67998
|
||||
pkg syscall, const EPROTO Errno #67998
|
||||
pkg unicode/utf16, func RuneLen(int32) int #44940
|
||||
pkg unique, func Make[$0 comparable]($0) Handle[$0] #62483
|
||||
pkg unique, method (Handle[$0]) Value() $0 #62483
|
||||
pkg unique, type Handle[$0 comparable] struct #62483
|
1
api/next/32936.txt
Normal file
1
api/next/32936.txt
Normal file
@ -0,0 +1 @@
|
||||
pkg crypto/tls, type ClientHelloInfo struct, Extensions []uint16 #32936
|
4
api/next/36532.txt
Normal file
4
api/next/36532.txt
Normal file
@ -0,0 +1,4 @@
|
||||
pkg testing, method (*B) Context() context.Context #36532
|
||||
pkg testing, method (*F) Context() context.Context #36532
|
||||
pkg testing, method (*T) Context() context.Context #36532
|
||||
pkg testing, type TB interface, Context() context.Context #36532
|
@ -1 +0,0 @@
|
||||
pkg runtime/debug, func SetCrashOutput(*os.File) error #42888
|
@ -1 +0,0 @@
|
||||
pkg unicode/utf16, func RuneLen(int32) int #44940
|
@ -1 +0,0 @@
|
||||
pkg net/http, type Cookie struct, Quoted bool #46443
|
@ -1,9 +0,0 @@
|
||||
pkg archive/tar, type FileInfoNames interface { Gname, IsDir, ModTime, Mode, Name, Size, Sys, Uname } #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Gname() (string, error) #50102
|
||||
pkg archive/tar, type FileInfoNames interface, IsDir() bool #50102
|
||||
pkg archive/tar, type FileInfoNames interface, ModTime() time.Time #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Mode() fs.FileMode #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Name() string #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Size() int64 #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Sys() interface{} #50102
|
||||
pkg archive/tar, type FileInfoNames interface, Uname() (string, error) #50102
|
1
api/next/51473.txt
Normal file
1
api/next/51473.txt
Normal file
@ -0,0 +1 @@
|
||||
pkg runtime, func GOROOT //deprecated #51473
|
2
api/next/54670.txt
Normal file
2
api/next/54670.txt
Normal file
@ -0,0 +1,2 @@
|
||||
pkg hash/maphash, func Comparable[$0 comparable](Seed, $0) uint64 #54670
|
||||
pkg hash/maphash, func WriteComparable[$0 comparable](*Hash, $0) #54670
|
@ -1 +0,0 @@
|
||||
pkg path/filepath, func Localize(string) (string, error) #57151
|
@ -1 +0,0 @@
|
||||
pkg net/http/httptest, func NewRequestWithContext(context.Context, string, string, io.Reader) *http.Request #59473
|
@ -1,4 +0,0 @@
|
||||
pkg reflect, type Type interface, OverflowComplex(complex128) bool #60427
|
||||
pkg reflect, type Type interface, OverflowFloat(float64) bool #60427
|
||||
pkg reflect, type Type interface, OverflowInt(int64) bool #60427
|
||||
pkg reflect, type Type interface, OverflowUint(uint64) bool #60427
|
@ -1 +0,0 @@
|
||||
pkg reflect, func SliceAt(Type, unsafe.Pointer, int) Value #61308
|
@ -1 +0,0 @@
|
||||
pkg net/http, method (*Request) CookiesNamed(string) []*Cookie #61472
|
1
api/next/61515.txt
Normal file
1
api/next/61515.txt
Normal file
@ -0,0 +1 @@
|
||||
pkg testing, method (*B) Loop() bool #61515
|
@ -1 +0,0 @@
|
||||
pkg sync, method (*Map) Clear() #61696
|
@ -1,2 +0,0 @@
|
||||
pkg math/rand/v2, func Uint() uint #61716
|
||||
pkg math/rand/v2, method (*Rand) Uint() uint #61716
|
@ -1,4 +0,0 @@
|
||||
pkg iter, func Pull2[$0 interface{}, $1 interface{}](Seq2[$0, $1]) (func() ($0, $1, bool), func()) #61897
|
||||
pkg iter, func Pull[$0 interface{}](Seq[$0]) (func() ($0, bool), func()) #61897
|
||||
pkg iter, type Seq2[$0 interface{}, $1 interface{}] func(func($0, $1) bool) #61897
|
||||
pkg iter, type Seq[$0 interface{}] func(func($0) bool) #61897
|
10
api/next/61901.txt
Normal file
10
api/next/61901.txt
Normal file
@ -0,0 +1,10 @@
|
||||
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 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
|
1
api/next/62005.txt
Normal file
1
api/next/62005.txt
Normal file
@ -0,0 +1 @@
|
||||
pkg log/slog, var DiscardHandler Handler #62005
|
@ -1,12 +0,0 @@
|
||||
pkg net, method (*TCPConn) SetKeepAliveConfig(KeepAliveConfig) error #62254
|
||||
pkg net, type Dialer struct, KeepAliveConfig KeepAliveConfig #62254
|
||||
pkg net, type KeepAliveConfig struct #62254
|
||||
pkg net, type KeepAliveConfig struct, Count int #62254
|
||||
pkg net, type KeepAliveConfig struct, Enable bool #62254
|
||||
pkg net, type KeepAliveConfig struct, Idle time.Duration #62254
|
||||
pkg net, type KeepAliveConfig struct, Interval time.Duration #62254
|
||||
pkg net, type ListenConfig struct, KeepAliveConfig KeepAliveConfig #62254
|
||||
pkg syscall (windows-386), const WSAENOPROTOOPT = 10042 #62254
|
||||
pkg syscall (windows-386), const WSAENOPROTOOPT Errno #62254
|
||||
pkg syscall (windows-amd64), const WSAENOPROTOOPT = 10042 #62254
|
||||
pkg syscall (windows-amd64), const WSAENOPROTOOPT Errno #62254
|
24
api/next/62384.txt
Normal file
24
api/next/62384.txt
Normal file
@ -0,0 +1,24 @@
|
||||
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 net/url, method (*URL) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg log/slog, method (Level) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg log/slog, method (*LevelVar) AppendText([]uint8) ([]uint8, error) #62384
|
||||
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 regexp, method (*Regexp) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg time, method (Time) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg time, method (Time) 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 crypto/x509, method (OID) AppendBinary([]uint8) ([]uint8, error) #62384
|
||||
pkg crypto/x509, method (OID) AppendText([]uint8) ([]uint8, error) #62384
|
||||
pkg net, method (IP) AppendText([]uint8) ([]uint8, error) #62384
|
||||
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
|
@ -1,3 +0,0 @@
|
||||
pkg unique, func Make[$0 comparable]($0) Handle[$0] #62483
|
||||
pkg unique, method (Handle[$0]) Value() $0 #62483
|
||||
pkg unique, type Handle[$0 comparable] struct #62483
|
@ -1 +0,0 @@
|
||||
pkg os, func CopyFS(string, fs.FS) error #62484
|
4
api/next/62516.txt
Normal file
4
api/next/62516.txt
Normal file
@ -0,0 +1,4 @@
|
||||
pkg testing, method (*B) Chdir(string) #62516
|
||||
pkg testing, method (*F) Chdir(string) #62516
|
||||
pkg testing, method (*T) Chdir(string) #62516
|
||||
pkg testing, type TB interface, Chdir(string) #62516
|
@ -1,2 +0,0 @@
|
||||
pkg net, type DNSError struct, UnwrapErr error #63116
|
||||
pkg net, method (*DNSError) Unwrap() error #63116
|
33
api/next/63952.txt
Normal file
33
api/next/63952.txt
Normal file
@ -0,0 +1,33 @@
|
||||
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
|
@ -1 +0,0 @@
|
||||
pkg slices, func Repeat[$0 interface{ ~[]$1 }, $1 interface{}]($0, int) $0 #65238
|
@ -1 +0,0 @@
|
||||
pkg go/types, method (*Func) Signature() *Signature #65772
|
@ -1,2 +0,0 @@
|
||||
pkg net/http, func ParseCookie(string) ([]*Cookie, error) #66008
|
||||
pkg net/http, func ParseSetCookie(string) (*Cookie, error) #66008
|
@ -1,2 +0,0 @@
|
||||
pkg debug/elf, const PT_OPENBSD_NOBTCFI = 1705237480 #66054
|
||||
pkg debug/elf, const PT_OPENBSD_NOBTCFI ProgType #66054
|
1
api/next/66450.txt
Normal file
1
api/next/66450.txt
Normal file
@ -0,0 +1 @@
|
||||
pkg crypto/subtle, func WithDataIndependentTiming(func()) #66450
|
@ -1 +0,0 @@
|
||||
pkg go/types, method (*Alias) Rhs() Type #66559
|
11
api/next/66626.txt
Normal file
11
api/next/66626.txt
Normal file
@ -0,0 +1,11 @@
|
||||
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
|
@ -1,6 +0,0 @@
|
||||
pkg debug/elf, const STT_GNU_IFUNC = 10 #66836
|
||||
pkg debug/elf, const STT_GNU_IFUNC SymType #66836
|
||||
pkg debug/elf, const STT_RELC = 8 #66836
|
||||
pkg debug/elf, const STT_RELC SymType #66836
|
||||
pkg debug/elf, const STT_SRELC = 9 #66836
|
||||
pkg debug/elf, const STT_SRELC SymType #66836
|
3
api/next/67535.txt
Normal file
3
api/next/67535.txt
Normal file
@ -0,0 +1,3 @@
|
||||
pkg runtime, func AddCleanup[$0 interface{}, $1 interface{}](*$0, func($1), $1) Cleanup #67535
|
||||
pkg runtime, method (Cleanup) Stop() #67535
|
||||
pkg runtime, type Cleanup struct #67535
|
3
api/next/67552.txt
Normal file
3
api/next/67552.txt
Normal file
@ -0,0 +1,3 @@
|
||||
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
|
14
api/next/67813.txt
Normal file
14
api/next/67813.txt
Normal file
@ -0,0 +1,14 @@
|
||||
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 Server struct, HTTP2 *HTTP2Config #67813
|
||||
pkg net/http, type Transport struct, HTTP2 *HTTP2Config #67813
|
8
api/next/67814.txt
Normal file
8
api/next/67814.txt
Normal file
@ -0,0 +1,8 @@
|
||||
pkg net/http, method (*Protocols) SetHTTP1(bool) #67814
|
||||
pkg net/http, method (*Protocols) SetHTTP2(bool) #67814
|
||||
pkg net/http, method (Protocols) String() string #67814
|
||||
pkg net/http, method (Protocols) HTTP1() bool #67814
|
||||
pkg net/http, method (Protocols) HTTP2() bool #67814
|
||||
pkg net/http, type Protocols struct #67814
|
||||
pkg net/http, type Server struct, Protocols *Protocols #67814
|
||||
pkg net/http, type Transport struct, Protocols *Protocols #67814
|
1
api/next/69981.txt
Normal file
1
api/next/69981.txt
Normal file
@ -0,0 +1 @@
|
||||
pkg crypto/cipher, func NewGCMWithRandomNonce(Block) (AEAD, error) #69981
|
@ -27,22 +27,49 @@ should have a corresponding file named `doc/next/6-stdlib/99-minor/net/http/1234
|
||||
At a minimum, that file should contain either a full sentence or a TODO,
|
||||
ideally referring to a person with the responsibility to complete the note.
|
||||
|
||||
If your CL addresses an accepted proposal, mention the proposal issue number in
|
||||
your release note in the form `/issue/NUMBER`. A link to the issue in the text
|
||||
will have this form (see below). If you don't want to mention the issue in the
|
||||
text, add it as a comment:
|
||||
```
|
||||
<!-- go.dev/issue/12345 -->
|
||||
```
|
||||
If an accepted proposal is mentioned in a CL but not in the release notes, it will be
|
||||
flagged as a TODO by the automated tooling. That is true even for proposals that add API.
|
||||
|
||||
Use the following forms in your markdown:
|
||||
|
||||
[http.Request] # symbol documentation; auto-linked as in Go doc strings
|
||||
[Request] # short form, for symbols in the package being documented
|
||||
[net/http] # package link
|
||||
[#12345](/issue/12345) # GitHub issues
|
||||
[CL 6789](/cl/6789) # Gerrit changelists
|
||||
|
||||
To preview `next` content in merged form using a local instance of the website, run:
|
||||
|
||||
```
|
||||
go run golang.org/x/website/cmd/golangorg@latest -goroot=..
|
||||
```
|
||||
|
||||
Then open http://localhost:6060/doc/next. Refresh the page to see your latest edits.
|
||||
|
||||
## For the release team
|
||||
|
||||
At the start of a release development cycle, the contents of `next` should be deleted
|
||||
and replaced with those of `initial`. From the repo root:
|
||||
The `relnote` tool, at `golang.org/x/build/cmd/relnote`, operates on the files
|
||||
in `doc/next`.
|
||||
|
||||
As a release cycle nears completion, run `relnote todo` to get a list of
|
||||
unfinished release note work.
|
||||
|
||||
To prepare the release notes for a release, run `relnote generate`.
|
||||
That will merge the `.md` files in `next` into a single file.
|
||||
Atomically (as close to it as possible) add that file to `_content/doc` directory
|
||||
of the website repository and remove the `doc/next` directory in this repository.
|
||||
|
||||
To begin the next release development cycle, populate the contents of `next`
|
||||
with those of `initial`. From the repo root:
|
||||
|
||||
> cd doc
|
||||
> rm -r next/*
|
||||
> cp -r initial/* next
|
||||
> cp -R initial/ next
|
||||
|
||||
Then edit `next/1-intro.md` to refer to the next version.
|
||||
|
||||
To prepare the release notes for a release, run `golang.org/x/build/cmd/relnote generate`.
|
||||
That will merge the `.md` files in `next` into a single file.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Version of Oct 15, 2021",
|
||||
"Subtitle": "Language version go1.17 (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://www.hpl.hp.com/techreports/2008/HPL-2008-56.pdf">Foundations of the C++ Concurrency Memory Model</a>”,
|
||||
“<a href="https://dl.acm.org/doi/10.1145/1375581.1375591">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.
|
||||
|
128
doc/go_spec.html
128
doc/go_spec.html
@ -1,6 +1,6 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Language version go1.22 (April 25, 2024)",
|
||||
"Subtitle": "Language version go1.23 (Oct 1, 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. The unqualified type name acts as the field name.
|
||||
a pointer type or type parameter. 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 <a href="#Types">named type</a>
|
||||
Given a struct type <code>S</code> and a type name
|
||||
<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 fields have the same names, and identical types,
|
||||
and identical tags.
|
||||
and if corresponding pairs of fields have the same names, identical types,
|
||||
and identical tags, and are either both embedded or both not embedded.
|
||||
<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 "=" Type .
|
||||
AliasDecl = identifier [ TypeParameters ] "=" Type .
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Within the <a href="#Declarations_and_scope">scope</a> of
|
||||
the identifier, it serves as an <i>alias</i> for the type.
|
||||
the identifier, it serves as an <i>alias</i> for the given type.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@ -2526,6 +2526,24 @@ 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>
|
||||
|
||||
@ -6620,7 +6638,8 @@ In that case, the example above prints
|
||||
<p>
|
||||
A "for" statement with a "range" clause
|
||||
iterates through all entries of an array, slice, string or map, values received on
|
||||
a channel, or integer values from zero to an upper limit [<a href="#Go_1.22">Go 1.22</a>].
|
||||
a channel, integer values from zero to an upper limit [<a href="#Go_1.22">Go 1.22</a>],
|
||||
or values passed to an iterator function's yield function [<a href="#Go_1.23">Go 1.23</a>].
|
||||
For each entry it assigns <i>iteration values</i>
|
||||
to corresponding <i>iteration variables</i> if present and then executes the block.
|
||||
</p>
|
||||
@ -6633,11 +6652,15 @@ RangeClause = [ ExpressionList "=" | IdentifierList ":=" ] "range" Expression .
|
||||
The expression on the right in the "range" clause is called the <i>range expression</i>,
|
||||
its <a href="#Core_types">core type</a> must be
|
||||
an array, pointer to an array, slice, string, map, channel permitting
|
||||
<a href="#Receive_operator">receive operations</a>, or an integer.
|
||||
<a href="#Receive_operator">receive operations</a>, an integer, or
|
||||
a function with specific signature (see below).
|
||||
As with an assignment, if present the operands on the left must be
|
||||
<a href="#Address_operators">addressable</a> or map index expressions; they
|
||||
denote the iteration variables. If the range expression is a channel or integer,
|
||||
at most one iteration variable is permitted, otherwise there may be up to two.
|
||||
denote the iteration variables.
|
||||
If the range expression is a function, the maximum number of iteration variables depends on
|
||||
the function signature.
|
||||
If the range expression is a channel or integer, at most one iteration variable is permitted;
|
||||
otherwise there may be up to two.
|
||||
If the last iteration variable is the <a href="#Blank_identifier">blank identifier</a>,
|
||||
the range clause is equivalent to the same clause without that identifier.
|
||||
</p>
|
||||
@ -6656,13 +6679,16 @@ if the respective iteration variables are present:
|
||||
</p>
|
||||
|
||||
<pre class="grammar">
|
||||
Range expression 1st value 2nd value
|
||||
Range expression 1st value 2nd value
|
||||
|
||||
array or slice a [n]E, *[n]E, or []E index i int a[i] E
|
||||
string s string type index i int see below rune
|
||||
map m map[K]V key k K m[k] V
|
||||
channel c chan E, <-chan E element e E
|
||||
integer value n integer type, or untyped int value i see below
|
||||
array or slice a [n]E, *[n]E, or []E index i int a[i] E
|
||||
string s string type index i int see below rune
|
||||
map m map[K]V key k K m[k] V
|
||||
channel c chan E, <-chan E element e E
|
||||
integer value n integer type, or untyped int value i see below
|
||||
function, 0 values f func(func() bool)
|
||||
function, 1 value f func(func(V) bool) value v V
|
||||
function, 2 values f func(func(K, V) bool) key k K v V
|
||||
</pre>
|
||||
|
||||
<ol>
|
||||
@ -6716,6 +6742,21 @@ Otherwise, if the iteration variable is declared by the "range" clause or is abs
|
||||
the type of the iteration values is the <a href="#Constants">default type</a> for <code>n</code>.
|
||||
If <code>n</code> <= 0, the loop does not run any iterations.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
For a function <code>f</code>, the iteration proceeds by calling <code>f</code>
|
||||
with a new, synthesized <code>yield</code> function as its argument.
|
||||
If <code>yield</code> is called before <code>f</code> returns,
|
||||
the arguments to <code>yield</code> become the iteration values
|
||||
for executing the loop body once.
|
||||
After each successive loop iteration, <code>yield</code> returns true
|
||||
and may be called again to continue the loop.
|
||||
As long as the loop body does not terminate, the "range" clause will continue
|
||||
to generate iteration values this way for each <code>yield</code> call until
|
||||
<code>f</code> returns.
|
||||
If the loop body terminates (such as by a <code>break</code> statement),
|
||||
<code>yield</code> returns false and must not be called again.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
@ -6784,6 +6825,44 @@ for u = range 256 {
|
||||
// invalid: 1e3 is a floating-point constant
|
||||
for range 1e3 {
|
||||
}
|
||||
|
||||
// fibo generates the Fibonacci sequence
|
||||
fibo := func(yield func(x int) bool) {
|
||||
f0, f1 := 0, 1
|
||||
for yield(f0) {
|
||||
f0, f1 = f1, f0+f1
|
||||
}
|
||||
}
|
||||
|
||||
// print the Fibonacci numbers below 1000:
|
||||
for x := range fibo {
|
||||
if x >= 1000 {
|
||||
break
|
||||
}
|
||||
fmt.Printf("%d ", x)
|
||||
}
|
||||
// output: 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
|
||||
|
||||
// iteration support for a recursive tree data structure
|
||||
type Tree[K cmp.Ordered, V any] struct {
|
||||
left, right *Tree[K, V]
|
||||
key K
|
||||
value V
|
||||
}
|
||||
|
||||
func (t *Tree[K, V]) walk(yield func(key K, val V) bool) bool {
|
||||
return t == nil || t.left.walk(yield) && yield(t.key, t.value) && t.right.walk(yield)
|
||||
}
|
||||
|
||||
func (t *Tree[K, V]) Walk(yield func(key K, val V) bool) {
|
||||
t.walk(yield)
|
||||
}
|
||||
|
||||
// walk tree t in-order
|
||||
var t Tree[string, int]
|
||||
for k, v := range t.Walk {
|
||||
// process k, v
|
||||
}
|
||||
</pre>
|
||||
|
||||
|
||||
@ -8620,6 +8699,21 @@ integer values from zero to an upper limit.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4 id="Go_1.23">Go 1.23</h4>
|
||||
<ul>
|
||||
<li>A "for" statement with <a href="#For_range">"range" clause</a> accepts an iterator
|
||||
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>
|
||||
|
112
doc/godebug.md
112
doc/godebug.md
@ -34,6 +34,7 @@ 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).
|
||||
|
||||
@ -88,14 +89,38 @@ Because this method of setting GODEBUG defaults was introduced only in Go 1.21,
|
||||
programs listing versions of Go earlier than Go 1.20 are configured to match Go 1.20,
|
||||
not the older version.
|
||||
|
||||
To override these defaults, a main package's source files
|
||||
To override these defaults, starting in Go 1.23, the work module's `go.mod`
|
||||
or the workspace's `go.work` can list one or more `godebug` lines:
|
||||
|
||||
godebug (
|
||||
default=go1.21
|
||||
panicnil=1
|
||||
asynctimerchan=0
|
||||
)
|
||||
|
||||
The special key `default` indicates a Go version to take unspecified
|
||||
settings from. This allows setting the GODEBUG defaults separately
|
||||
from the Go language version in the module.
|
||||
In this example, the program is asking for Go 1.21 semantics and
|
||||
then asking for the old pre-Go 1.21 `panic(nil)` behavior and the
|
||||
new Go 1.23 `asynctimerchan=0` behavior.
|
||||
|
||||
Only the work module's `go.mod` is consulted for `godebug` directives.
|
||||
Any directives in required dependency modules are ignored.
|
||||
It is an error to list a `godebug` with an unrecognized setting.
|
||||
(Toolchains older than Go 1.23 reject all `godebug` lines, since they do not
|
||||
understand `godebug` at all.)
|
||||
|
||||
The defaults from the `go` and `godebug` lines apply to all main
|
||||
packages that are built. For more fine-grained control,
|
||||
starting in Go 1.21, a main package's source files
|
||||
can include one or more `//go:debug` directives at the top of the file
|
||||
(preceding the `package` statement).
|
||||
Continuing the `panicnil` example, if the module or workspace is updated
|
||||
to say `go` `1.21`, the program can opt back into the old `panic(nil)`
|
||||
behavior by including this directive:
|
||||
The `godebug` lines in the previous example would be written:
|
||||
|
||||
//go:debug default=go1.21
|
||||
//go:debug panicnil=1
|
||||
//go:debug asynctimerchan=0
|
||||
|
||||
Starting in Go 1.21, the Go toolchain treats a `//go:debug` directive
|
||||
with an unrecognized GODEBUG setting as an invalid program.
|
||||
@ -126,6 +151,43 @@ 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 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.23
|
||||
|
||||
Go 1.23 changed the channels created by package time to be unbuffered
|
||||
@ -152,6 +214,39 @@ This behavior is controlled by the `winreadlinkvolume` setting.
|
||||
For Go 1.23, it defaults to `winreadlinkvolume=1`.
|
||||
Previous versions default to `winreadlinkvolume=0`.
|
||||
|
||||
Go 1.23 enabled the experimental post-quantum key exchange mechanism
|
||||
X25519Kyber768Draft00 by default. The default can be reverted using the
|
||||
[`tlskyber` setting](/pkg/crypto/tls/#Config.CurvePreferences).
|
||||
|
||||
Go 1.23 changed the behavior of
|
||||
[crypto/x509.ParseCertificate](/pkg/crypto/x509/#ParseCertificate) to reject
|
||||
serial numbers that are negative. This change can be reverted with
|
||||
the [`x509negativeserial` setting](/pkg/crypto/x509/#ParseCertificate).
|
||||
|
||||
Go 1.23 re-enabled support in html/template for ECMAScript 6 template literals by default.
|
||||
The [`jstmpllitinterp` setting](/pkg/html/template#hdr-Security_Model) no longer has
|
||||
any effect.
|
||||
|
||||
Go 1.23 changed the default TLS cipher suites used by clients and servers when
|
||||
not explicitly configured, removing 3DES cipher suites. The default can be reverted
|
||||
using the [`tls3des` setting](/pkg/crypto/tls/#Config.CipherSuites).
|
||||
|
||||
Go 1.23 changed the behavior of [`tls.X509KeyPair`](/pkg/crypto/tls#X509KeyPair)
|
||||
and [`tls.LoadX509KeyPair`](/pkg/crypto/tls#LoadX509KeyPair) to populate the
|
||||
Leaf field of the returned [`tls.Certificate`](/pkg/crypto/tls#Certificate).
|
||||
This behavior is controlled by the `x509keypairleaf` setting. For Go 1.23, it
|
||||
defaults to `x509keypairleaf=1`. Previous versions default to
|
||||
`x509keypairleaf=0`.
|
||||
|
||||
Go 1.23 changed
|
||||
[`net/http.ServeContent`](/pkg/net/http#ServeContent),
|
||||
[`net/http.ServeFile`](/pkg/net/http#ServeFile), and
|
||||
[`net/http.ServeFS`](/pkg/net/http#ServeFS) to
|
||||
remove Cache-Control, Content-Encoding, Etag, and Last-Modified headers
|
||||
when serving an error. This behavior is controlled by
|
||||
the [`httpservecontentkeepheaders` setting](/pkg/net/http#ServeContent).
|
||||
Using `httpservecontentkeepheaders=1` restores the pre-Go 1.23 behavior.
|
||||
|
||||
### Go 1.22
|
||||
|
||||
Go 1.22 adds a configurable limit to control the maximum acceptable RSA key size
|
||||
@ -175,7 +270,7 @@ Whether the type checker produces `Alias` types or not is controlled by the
|
||||
[`gotypesalias` setting](/pkg/go/types#Alias).
|
||||
For Go 1.22 it defaults to `gotypesalias=0`.
|
||||
For Go 1.23, `gotypesalias=1` will become the default.
|
||||
This setting will be removed in a future release, Go 1.24 at the earliest.
|
||||
This setting will be removed in a future release, Go 1.27 at the earliest.
|
||||
|
||||
Go 1.22 changed the default minimum TLS version supported by both servers
|
||||
and clients to TLS 1.2. The default can be reverted to TLS 1.0 using the
|
||||
@ -274,6 +369,13 @@ Go 1.19 made it an error for path lookups to resolve to binaries in the current
|
||||
controlled by the [`execerrdot` setting](/pkg/os/exec#hdr-Executables_in_the_current_directory).
|
||||
There is no plan to remove this setting.
|
||||
|
||||
Go 1.19 started sending EDNS0 additional headers on DNS requests.
|
||||
This can reportedly break the DNS server provided on some routers,
|
||||
such as CenturyLink Zyxel C3000Z.
|
||||
This can be changed by the [`netedns0` setting](/pkg/net#hdr-Name_Resolution).
|
||||
This setting is available in Go 1.21.12, Go 1.22.5, Go 1.23, and later.
|
||||
There is no plan to remove this setting.
|
||||
|
||||
### Go 1.18
|
||||
|
||||
Go 1.18 removed support for SHA1 in most X.509 certificates,
|
||||
|
@ -8,5 +8,7 @@ set fixed-width phrases with non-fixed-width spaces, as in
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
## Introduction to Go 1.XX {#introduction}
|
||||
## DRAFT RELEASE NOTES — Introduction to Go 1.N {#introduction}
|
||||
|
||||
**Go 1.N is not yet released. These are work-in-progress release notes.
|
||||
Go 1.N is expected to be released in {Month} {Year}.**
|
||||
|
@ -8,5 +8,7 @@ set fixed-width phrases with non-fixed-width spaces, as in
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
## Introduction to Go 1.23 {#introduction}
|
||||
## DRAFT RELEASE NOTES — Introduction to Go 1.24 {#introduction}
|
||||
|
||||
**Go 1.24 is not yet released. These are work-in-progress release notes.
|
||||
Go 1.24 is expected to be released in February 2025.**
|
||||
|
@ -2,25 +2,39 @@
|
||||
|
||||
### Go command {#go-command}
|
||||
|
||||
Setting the `GOROOT_FINAL` environment variable no longer has an effect
|
||||
([#62047](https://go.dev/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.
|
||||
The `go build` and `go install` commands now accept a `-json` flag that reports
|
||||
build output and failures as structured JSON output on standard output.
|
||||
For details of the reporting format, see `go help buildjson`.
|
||||
|
||||
### Vet {#vet}
|
||||
|
||||
The `go vet` subcommand now includes the
|
||||
[stdversion](https://beta.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](https://pkg.go.dev/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`.
|
||||
Furthermore, `go test -json` now reports build output and failures in JSON,
|
||||
interleaved with test result JSON.
|
||||
These are distinguished by new `Action` types, but if they cause problems in
|
||||
a test integration system, you can revert to the text build output by setting
|
||||
`GODEBUG=gotestjsonbuildtext=1`.
|
||||
|
||||
### Cgo {#cgo}
|
||||
|
||||
Cgo currently refuses to compile calls to a C function which has multiple
|
||||
incompatible declarations. For instance, if `f` is declared as both `void f(int)`
|
||||
and `void f(double)`, cgo will report an error instead of possibly generating an
|
||||
incorrect call sequence for `f(0)`. New in this release is a better detector for
|
||||
this error condition when the incompatible declarations appear in different
|
||||
files. See [#67699](/issue/67699).
|
||||
|
||||
### Vet
|
||||
|
||||
The new `tests` analyzer reports common mistakes in declarations of
|
||||
tests, fuzzers, benchmarks, and examples in test packages, such as
|
||||
malformed names, incorrect signatures, or examples that document
|
||||
non-existent identifiers. Some of these mistakes may cause tests not
|
||||
to run.
|
||||
|
||||
This analyzer is among the subset of analyzers that are run by `go test`.
|
||||
|
||||
### GOCACHEPROG
|
||||
|
||||
The `cmd/go` internal binary and test caching mechanism can now be implemented
|
||||
by child processes implementing a JSON protocol between the `cmd/go` tool
|
||||
and the child process named by the `GOCACHEPROG` environment variable.
|
||||
This was previously behind a GOEXPERIMENT.
|
||||
For protocol details, see [#59719](/issue/59719).
|
||||
|
@ -1,11 +1,12 @@
|
||||
## 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.
|
||||
|
||||
## Assembler {#assembler}
|
||||
|
||||
## Linker {#linker}
|
||||
|
||||
## Bootstrap {#bootstrap}
|
||||
|
||||
<!-- go.dev/issue/64751 -->
|
||||
As mentioned in the [Go 1.22 release notes](/doc/go1.22#bootstrap), Go 1.24 now requires
|
||||
Go 1.22.6 or later for bootstrap.
|
||||
We expect that Go 1.26 will require a point release of Go 1.24 or later for bootstrap.
|
||||
|
@ -1,2 +1,2 @@
|
||||
## Core library {#library}
|
||||
## Standard library {#library}
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
### Timer changes
|
||||
|
||||
Go 1.23 makes two significant changes to the implementation of
|
||||
[time.Timer] and [time.Ticker].
|
||||
|
||||
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.
|
||||
|
||||
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.
|
12
doc/next/6-stdlib/1-weak.md
Normal file
12
doc/next/6-stdlib/1-weak.md
Normal file
@ -0,0 +1,12 @@
|
||||
### New weak package
|
||||
|
||||
The new [weak](/pkg/weak) package provides weak pointers.
|
||||
|
||||
Weak pointers are a low-level primitive provided to enable the
|
||||
creation of memory-efficient structures, such as weak maps for
|
||||
associating values, canonicalization maps for anything not
|
||||
covered by package [unique](/pkg/unique), and various kinds
|
||||
of caches.
|
||||
For supporting these use-cases, this release also provides
|
||||
[runtime.AddCleanup](/pkg/runtime#AddCleanup) and
|
||||
[maphash.Comparable](/pkg/maphash#Comparable).
|
@ -1,13 +0,0 @@
|
||||
### New unique package
|
||||
|
||||
The new [unique](/pkg/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.
|
@ -1,4 +0,0 @@
|
||||
### Iterators
|
||||
|
||||
The new [`iter` package](/pkg/iter/) provides the basic definitions for
|
||||
working with user-defined iterators.
|
2
doc/next/6-stdlib/99-minor/archive/66831.md
Normal file
2
doc/next/6-stdlib/99-minor/archive/66831.md
Normal file
@ -0,0 +1,2 @@
|
||||
The `(*Writer).AddFS` implementations in both `archive/zip` and `archive/tar`
|
||||
now write a directory header for an empty directory.
|
@ -1,4 +0,0 @@
|
||||
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.
|
12
doc/next/6-stdlib/99-minor/bytes/61901.md
Normal file
12
doc/next/6-stdlib/99-minor/bytes/61901.md
Normal file
@ -0,0 +1,12 @@
|
||||
The [bytes] package adds several functions that work with iterators:
|
||||
- [Lines] returns an iterator over the
|
||||
newline-terminated lines in the byte slice s.
|
||||
- [SplitSeq] returns an iterator over
|
||||
all substrings of s separated by sep.
|
||||
- [SplitAfterSeq] returns an iterator
|
||||
over substrings of s split after each instance of sep.
|
||||
- [FieldsSeq] returns an iterator over
|
||||
substrings of s split around runs of whitespace characters,
|
||||
as defined by unicode.IsSpace.
|
||||
- [FieldsFuncSeq] returns an iterator
|
||||
over substrings of s split around runs of Unicode code points satisfying f(c).
|
3
doc/next/6-stdlib/99-minor/crypto/cipher/69981.md
Normal file
3
doc/next/6-stdlib/99-minor/crypto/cipher/69981.md
Normal file
@ -0,0 +1,3 @@
|
||||
The new [NewGCMWithRandomNonce] function returns an [AEAD] that implements
|
||||
AES-GCM by generating a random nonce during Seal and prepending it to the
|
||||
ciphertext.
|
1
doc/next/6-stdlib/99-minor/crypto/md5/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/crypto/md5/62384.md
Normal file
@ -0,0 +1 @@
|
||||
The value returned by [md5.New] now also implements the [encoding.BinaryAppender] interface.
|
1
doc/next/6-stdlib/99-minor/crypto/sha1/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/crypto/sha1/62384.md
Normal file
@ -0,0 +1 @@
|
||||
The value returned by [sha1.New] now also implements the [encoding.BinaryAppender] interface.
|
1
doc/next/6-stdlib/99-minor/crypto/sha256/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/crypto/sha256/62384.md
Normal file
@ -0,0 +1 @@
|
||||
The values returned by [sha256.New] and [sha256.New224] now also implement the [encoding.BinaryAppender] interface
|
1
doc/next/6-stdlib/99-minor/crypto/sha512/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/crypto/sha512/62384.md
Normal file
@ -0,0 +1 @@
|
||||
The values returned by [sha512.New], [sha512.New384], [sha512.New512_224] and [sha512.New512_256] now also implement the [encoding.BinaryAppender] interface.
|
6
doc/next/6-stdlib/99-minor/crypto/subtle/66450.md
Normal file
6
doc/next/6-stdlib/99-minor/crypto/subtle/66450.md
Normal file
@ -0,0 +1,6 @@
|
||||
The [WithDataIndependentTiming] function allows the user to run a function with
|
||||
architecture specific features enabled which guarantee specific instructions are
|
||||
data value timing invariant. This can be used to make sure that code designed to
|
||||
run in constant time is not optimized by CPU-level features such that it
|
||||
operates in variable time. Currently, [WithDataIndependentTiming] uses the
|
||||
PSTATE.DIT bit on arm64, and is a no-op on all other architectures.
|
1
doc/next/6-stdlib/99-minor/crypto/tls/32936.md
Normal file
1
doc/next/6-stdlib/99-minor/crypto/tls/32936.md
Normal file
@ -0,0 +1 @@
|
||||
The [ClientHelloInfo] struct passed to [Config.GetCertificate] now includes an `Extensions` field, which can be useful for fingerprinting TLS clients.<!-- go.dev/issue/32936 -->
|
2
doc/next/6-stdlib/99-minor/crypto/x509/62384.md
Normal file
2
doc/next/6-stdlib/99-minor/crypto/x509/62384.md
Normal file
@ -0,0 +1,2 @@
|
||||
[OID] now implements the [encoding.BinaryAppender] and [encoding.TextAppender]
|
||||
interfaces.
|
@ -1,3 +0,0 @@
|
||||
Errors returned by [driver.Valuer] implementations are now wrapped for
|
||||
improved error handling during operations like [DB.Query], [DB.Exec],
|
||||
and [DB.QueryRow].
|
20
doc/next/6-stdlib/99-minor/debug/elf/63952.md
Normal file
20
doc/next/6-stdlib/99-minor/debug/elf/63952.md
Normal file
@ -0,0 +1,20 @@
|
||||
The [debug/elf] package adds several new constants, types, and methods to add support for handling dynamic versions and version flags in ELF (Executable and Linkable Format) files:
|
||||
|
||||
Several new types have been introduced:
|
||||
- [DynamicVersion] struct represents a dynamic version entry in the ELF file.
|
||||
- [DynamicVersionDep] struct represents a dependency of a dynamic version.
|
||||
- [DynamicVersionNeed] struct represents a required dynamic version in the ELF file.
|
||||
- [DynamicVersionFlag] is a new type defined as uint16, representing flags for dynamic versions.
|
||||
- [VER_FLG_BASE] version definition of the file.
|
||||
- [VER_FLG_WEAK] weak version identifier.
|
||||
- [VER_FLG_INFO] reference exists for informational purposes.
|
||||
- [SymbolVersionFlag] is a new type defined as uint8, representing version flags for ELF symbols.
|
||||
- [VerFlagNone] no flags.
|
||||
- [VerFlagLocal] symbol has local scope.
|
||||
- [VerFlagGlobal] symbol has global scope.
|
||||
- [VerFlagHidden] symbol is hidden.
|
||||
|
||||
The following methods have been added:
|
||||
- [File.DynamicVersionNeeds] method returns a list of dynamic version needs in the ELF file, representing dependencies required by the executable.
|
||||
- [File.DynamicVersions] retrieves a list of dynamic versions defined in the ELF file.
|
||||
<!-- go.dev/issue/63952 -->
|
@ -1,3 +0,0 @@
|
||||
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.
|
@ -1,2 +0,0 @@
|
||||
Now defines the symbol type constants [STT_RELC], [STT_SRELC], and
|
||||
[STT_GNU_IFUNC].
|
5
doc/next/6-stdlib/99-minor/encoding/62384.md
Normal file
5
doc/next/6-stdlib/99-minor/encoding/62384.md
Normal file
@ -0,0 +1,5 @@
|
||||
Two new interfaces, [TextAppender] and [BinaryAppender], have been
|
||||
introduced to append the textual or binary representation of an object
|
||||
to a byte slice. These interfaces provide the same functionality as
|
||||
[TextMarshaler] and [BinaryMarshaler], but instead of allocating a new slice
|
||||
each time, they append the data directly to an existing slice.
|
7
doc/next/6-stdlib/99-minor/encoding/json/45669.md
Normal file
7
doc/next/6-stdlib/99-minor/encoding/json/45669.md
Normal file
@ -0,0 +1,7 @@
|
||||
When marshaling, a struct field with the new `omitzero` option in the struct field
|
||||
tag will be omitted if its value is zero. If the field type has an `IsZero() bool`
|
||||
method, that will be used to determine whether the value is zero. Otherwise, the
|
||||
value is zero if it is [the zero value for its type](/ref/spec#The_zero_value).
|
||||
|
||||
If both `omitempty` and `omitzero` are specified, the field will be omitted if the
|
||||
value is either empty or zero (or both).
|
1
doc/next/6-stdlib/99-minor/encoding/json/68941.md
Normal file
1
doc/next/6-stdlib/99-minor/encoding/json/68941.md
Normal file
@ -0,0 +1 @@
|
||||
[UnmarshalTypeError.Field] now includes embedded structs to provide more detailed error messages.
|
@ -1,3 +0,0 @@
|
||||
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`.
|
@ -1,3 +0,0 @@
|
||||
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/12345))
|
32
doc/next/6-stdlib/99-minor/go/types/66626.md
Normal file
32
doc/next/6-stdlib/99-minor/go/types/66626.md
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
All `go/types` data structures that expose sequences using a pair of
|
||||
methods such as `Len() int` and `At(int) T` now also methods that
|
||||
return iterators, allowing you to simplify code such as this:
|
||||
|
||||
```go
|
||||
params := fn.Type.(*types.Signature).Params()
|
||||
for i := 0; i < params.Len(); i++ {
|
||||
use(params.At(i))
|
||||
}
|
||||
```
|
||||
|
||||
to this:
|
||||
|
||||
```go
|
||||
for param := range fn.Signature().Params().Variables() {
|
||||
use(param)
|
||||
}
|
||||
```
|
||||
|
||||
The methods are:
|
||||
[`Interface.EmbeddedTypes`](/pkg/go/types#Interface.EmbeddedTypes),
|
||||
[`Interface.ExplicitMethods`](/pkg/go/types#Interface.ExplicitMethods),
|
||||
[`Interface.Methods`](/pkg/go/types#Interface.Methods),
|
||||
[`MethodSet.Methods`](/pkg/go/types#MethodSet.Methods),
|
||||
[`Named.Methods`](/pkg/go/types#Named.Methods),
|
||||
[`Scope.Children`](/pkg/go/types#Scope.Children),
|
||||
[`Struct.Fields`](/pkg/go/types#Struct.Fields),
|
||||
[`Tuple.Variables`](/pkg/go/types#Tuple.Variables),
|
||||
[`TypeList.Types`](/pkg/go/types#TypeList.Types),
|
||||
[`TypeParamList.TypeParams`](/pkg/go/types#TypeParamList.TypeParams),
|
||||
[`Union.Terms`](/pkg/go/types#Union.Terms).
|
1
doc/next/6-stdlib/99-minor/hash/adler32/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/hash/adler32/62384.md
Normal file
@ -0,0 +1 @@
|
||||
The value returned by [New] now also implements the [encoding.BinaryAppender] interface.
|
1
doc/next/6-stdlib/99-minor/hash/crc32/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/hash/crc32/62384.md
Normal file
@ -0,0 +1 @@
|
||||
The values returned by [New] and [NewIEEE] now also implement the [encoding.BinaryAppender] interface.
|
1
doc/next/6-stdlib/99-minor/hash/crc64/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/hash/crc64/62384.md
Normal file
@ -0,0 +1 @@
|
||||
The value returned by [New] now also implements the [encoding.BinaryAppender] interface.
|
1
doc/next/6-stdlib/99-minor/hash/fnv/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/hash/fnv/62384.md
Normal file
@ -0,0 +1 @@
|
||||
The values returned by [New32], [New32a], [New64], [New64a], [New128] and [New128a] now also implement the [encoding.BinaryAppender] interface.
|
2
doc/next/6-stdlib/99-minor/hash/maphash/54670.md
Normal file
2
doc/next/6-stdlib/99-minor/hash/maphash/54670.md
Normal file
@ -0,0 +1,2 @@
|
||||
New function [Comparable] returns the hash of comparable value v.
|
||||
New function [WriteComparable] adds x to the data hashed by [Hash].
|
@ -1 +0,0 @@
|
||||
<!-- see ../../3-iter.md -->
|
1
doc/next/6-stdlib/99-minor/log/slog/62005.md
Normal file
1
doc/next/6-stdlib/99-minor/log/slog/62005.md
Normal file
@ -0,0 +1 @@
|
||||
The new [DiscardHandler] is a handler that is never enabled and always discards its output.
|
1
doc/next/6-stdlib/99-minor/log/slog/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/log/slog/62384.md
Normal file
@ -0,0 +1 @@
|
||||
[Level] and [LevelVar] now implement the [encoding.TextAppender] interface.
|
1
doc/next/6-stdlib/99-minor/math/big/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/math/big/62384.md
Normal file
@ -0,0 +1 @@
|
||||
[Float], [Int] and [Rat] now implement the [encoding.TextAppender] interface.
|
3
doc/next/6-stdlib/99-minor/math/rand/67273.md
Normal file
3
doc/next/6-stdlib/99-minor/math/rand/67273.md
Normal file
@ -0,0 +1,3 @@
|
||||
Calls to the deprecated top-level [Seed] function no longer have any effect. To
|
||||
restore the old behavior set `GODEBUG=randseednop=0`. For more background see
|
||||
the proposal [#67273](/issue/67273).
|
@ -1,2 +0,0 @@
|
||||
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/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/math/rand/v2/62384.md
Normal file
@ -0,0 +1 @@
|
||||
[ChaCha8] and [PCG] now implement the [encoding.BinaryAppender] interface.
|
2
doc/next/6-stdlib/99-minor/net/56539.md
Normal file
2
doc/next/6-stdlib/99-minor/net/56539.md
Normal file
@ -0,0 +1,2 @@
|
||||
[ListenConfig] now uses MPTCP by default on systems where it is supported
|
||||
(currently on Linux only).
|
@ -1,3 +0,0 @@
|
||||
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].
|
1
doc/next/6-stdlib/99-minor/net/62384.md
Normal file
1
doc/next/6-stdlib/99-minor/net/62384.md
Normal file
@ -0,0 +1 @@
|
||||
[IP] now implements the [encoding.TextAppender] interface.
|
@ -1,3 +0,0 @@
|
||||
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.
|
@ -1,3 +0,0 @@
|
||||
[Cookie] now preserves double quotes surrounding a cookie value.
|
||||
The new [Cookie.Quoted] field indicates whether the [Cookie.Value]
|
||||
was originally quoted.
|
@ -1 +0,0 @@
|
||||
The new [Request.CookiesNamed] method retrieves all cookies that match the given name.
|
@ -1,2 +0,0 @@
|
||||
The patterns used by [ServeMux] allow multiple spaces matching
|
||||
regexp '[ \t]+'.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user