api: audit for Go 1.26
This is a tracking issue for doing an audit of API additions for Go 1.26 as of CL 726340.
New API changes for Go 1.26
bytes
method (*Buffer) Peek(int) ([]uint8, error)#73794
crypto
type Decapsulator interface { Decapsulate, Encapsulator }#75300type Decapsulator interface, Decapsulate([]uint8) ([]uint8, error)#75300type Decapsulator interface, Encapsulator() Encapsulator#75300type Encapsulator interface { Bytes, Encapsulate }#75300type Encapsulator interface, Bytes() []uint8#75300type Encapsulator interface, Encapsulate() ([]uint8, []uint8)#75300
crypto/ecdh
type KeyExchanger interface { Curve, ECDH, PublicKey }#75300type KeyExchanger interface, Curve() Curve#75300type KeyExchanger interface, ECDH(*PublicKey) ([]uint8, error)#75300type KeyExchanger interface, PublicKey() *PublicKey#75300
crypto/ecdsa
type PrivateKey struct, D //deprecated#63963type PublicKey struct, X //deprecated#63963type PublicKey struct, Y //deprecated#63963
crypto/fips140
func Enforced() bool#74630func Version() string#75301func WithoutEnforcement(func())#74630
crypto/hpke
func AES128GCM() AEAD#75300func AES256GCM() AEAD#75300func ChaCha20Poly1305() AEAD#75300func DHKEM(ecdh.Curve) KEM#75300func ExportOnly() AEAD#75300func HKDFSHA256() KDF#75300func HKDFSHA384() KDF#75300func HKDFSHA512() KDF#75300func MLKEM1024() KEM#75300func MLKEM1024P384() KEM#75300func MLKEM768() KEM#75300func MLKEM768P256() KEM#75300func MLKEM768X25519() KEM#75300func NewAEAD(uint16) (AEAD, error)#75300func NewDHKEMPrivateKey(ecdh.KeyExchanger) (PrivateKey, error)#75300func NewDHKEMPublicKey(*ecdh.PublicKey) (PublicKey, error)#75300func NewHybridPrivateKey(crypto.Decapsulator, ecdh.KeyExchanger) (PrivateKey, error)#75300func NewHybridPublicKey(crypto.Encapsulator, *ecdh.PublicKey) (PublicKey, error)#75300func NewKDF(uint16) (KDF, error)#75300func NewKEM(uint16) (KEM, error)#75300func NewMLKEMPrivateKey(crypto.Decapsulator) (PrivateKey, error)#75300func NewMLKEMPublicKey(crypto.Encapsulator) (PublicKey, error)#75300func NewRecipient([]uint8, PrivateKey, KDF, AEAD, []uint8) (*Recipient, error)#75300func NewSender(PublicKey, KDF, AEAD, []uint8) ([]uint8, *Sender, error)#75300func Open(PrivateKey, KDF, AEAD, []uint8, []uint8) ([]uint8, error)#75300func SHAKE128() KDF#75300func SHAKE256() KDF#75300func Seal(PublicKey, KDF, AEAD, []uint8, []uint8) ([]uint8, error)#75300method (*Recipient) Export(string, int) ([]uint8, error)#75300method (*Recipient) Open([]uint8, []uint8) ([]uint8, error)#75300method (*Sender) Export(string, int) ([]uint8, error)#75300method (*Sender) Seal([]uint8, []uint8) ([]uint8, error)#75300type AEAD interface, ID() uint16#75300type AEAD interface, unexported methods#75300type KDF interface, ID() uint16#75300type KDF interface, unexported methods#75300type KEM interface, DeriveKeyPair([]uint8) (PrivateKey, error)#75300type KEM interface, GenerateKey() (PrivateKey, error)#75300type KEM interface, ID() uint16#75300type KEM interface, NewPrivateKey([]uint8) (PrivateKey, error)#75300type KEM interface, NewPublicKey([]uint8) (PublicKey, error)#75300type KEM interface, unexported methods#75300type PrivateKey interface, Bytes() ([]uint8, error)#75300type PrivateKey interface, KEM() KEM#75300type PrivateKey interface, PublicKey() PublicKey#75300type PrivateKey interface, unexported methods#75300type PublicKey interface, Bytes() []uint8#75300type PublicKey interface, KEM() KEM#75300type PublicKey interface, unexported methods#75300type Recipient struct#75300type Sender struct#75300
crypto/mlkem
method (*DecapsulationKey1024) Encapsulator() crypto.Encapsulator#75300method (*DecapsulationKey768) Encapsulator() crypto.Encapsulator#75300
crypto/mlkem/mlkemtest
func Encapsulate1024(*mlkem.EncapsulationKey1024, []uint8) ([]uint8, []uint8, error)#73627func Encapsulate768(*mlkem.EncapsulationKey768, []uint8) ([]uint8, []uint8, error)#73627
crypto/rsa
func DecryptPKCS1v15 //deprecated#75302func DecryptPKCS1v15SessionKey //deprecated#75302func EncryptOAEPWithOptions(io.Reader, *PublicKey, []uint8, *OAEPOptions) ([]uint8, error)#65716func EncryptPKCS1v15 //deprecated#75302type PKCS1v15DecryptOptions //deprecated#75302
crypto/tls
const QUICErrorEvent = 10#75108const QUICErrorEvent QUICEventKind#75108const SecP256r1MLKEM768 = 4587#71206const SecP256r1MLKEM768 CurveID#71206const SecP384r1MLKEM1024 = 4589#71206const SecP384r1MLKEM1024 CurveID#71206type ClientHelloInfo struct, HelloRetryRequest bool#74425type ConnectionState struct, HelloRetryRequest bool#74425type QUICEvent struct, Err error#75108
crypto/x509
func OIDFromASN1OID(asn1.ObjectIdentifier) (OID, error)#75325method (ExtKeyUsage) OID() OID#75325method (ExtKeyUsage) String() string#56866method (KeyUsage) String() string#56866
database/sql/driver
type RowsColumnScanner interface { Close, Columns, Next, ScanColumn }#67546type RowsColumnScanner interface, Close() error#67546type RowsColumnScanner interface, Columns() []string#67546type RowsColumnScanner interface, Next([]Value) error#67546type RowsColumnScanner interface, ScanColumn(interface{}, int) error#67546
debug/elf
const R_LARCH_CALL36 = 110#75562const R_LARCH_CALL36 R_LARCH#75562const R_LARCH_TLS_DESC32 = 13#75562const R_LARCH_TLS_DESC32 R_LARCH#75562const R_LARCH_TLS_DESC64 = 14#75562const R_LARCH_TLS_DESC64 R_LARCH#75562const R_LARCH_TLS_DESC64_HI12 = 118#75562const R_LARCH_TLS_DESC64_HI12 R_LARCH#75562const R_LARCH_TLS_DESC64_LO20 = 117#75562const R_LARCH_TLS_DESC64_LO20 R_LARCH#75562const R_LARCH_TLS_DESC64_PC_HI12 = 114#75562const R_LARCH_TLS_DESC64_PC_HI12 R_LARCH#75562const R_LARCH_TLS_DESC64_PC_LO20 = 113#75562const R_LARCH_TLS_DESC64_PC_LO20 R_LARCH#75562const R_LARCH_TLS_DESC_CALL = 120#75562const R_LARCH_TLS_DESC_CALL R_LARCH#75562const R_LARCH_TLS_DESC_HI20 = 115#75562const R_LARCH_TLS_DESC_HI20 R_LARCH#75562const R_LARCH_TLS_DESC_LD = 119#75562const R_LARCH_TLS_DESC_LD R_LARCH#75562const R_LARCH_TLS_DESC_LO12 = 116#75562const R_LARCH_TLS_DESC_LO12 R_LARCH#75562const R_LARCH_TLS_DESC_PCREL20_S2 = 126#75562const R_LARCH_TLS_DESC_PCREL20_S2 R_LARCH#75562const R_LARCH_TLS_DESC_PC_HI20 = 111#75562const R_LARCH_TLS_DESC_PC_HI20 R_LARCH#75562const R_LARCH_TLS_DESC_PC_LO12 = 112#75562const R_LARCH_TLS_DESC_PC_LO12 R_LARCH#75562const R_LARCH_TLS_GD_PCREL20_S2 = 125#75562const R_LARCH_TLS_GD_PCREL20_S2 R_LARCH#75562const R_LARCH_TLS_LD_PCREL20_S2 = 124#75562const R_LARCH_TLS_LD_PCREL20_S2 R_LARCH#75562const R_LARCH_TLS_LE_ADD_R = 122#75562const R_LARCH_TLS_LE_ADD_R R_LARCH#75562const R_LARCH_TLS_LE_HI20_R = 121#75562const R_LARCH_TLS_LE_HI20_R R_LARCH#75562const R_LARCH_TLS_LE_LO12_R = 123#75562const R_LARCH_TLS_LE_LO12_R R_LARCH#75562
errors
func AsType[$0 error](error) ($0, bool)#51945
go/ast
func ParseDirective(token.Pos, string) (Directive, bool)#68021method (*Directive) End() token.Pos#68021method (*Directive) ParseArgs() ([]DirectiveArg, error)#68021method (*Directive) Pos() token.Pos#68021type BasicLit struct, ValueEnd token.Pos#76031type Directive struct#68021type Directive struct, Args string#68021type Directive struct, ArgsPos token.Pos#68021type Directive struct, Name string#68021type Directive struct, Slash token.Pos#68021type Directive struct, Tool string#68021type DirectiveArg struct#68021type DirectiveArg struct, Arg string#68021type DirectiveArg struct, Pos token.Pos#68021
go/token
method (*File) End() Pos#75849
log/slog
func NewMultiHandler(...Handler) *MultiHandler#65954method (*MultiHandler) Enabled(context.Context, Level) bool#65954method (*MultiHandler) Handle(context.Context, Record) error#65954method (*MultiHandler) WithAttrs([]Attr) Handler#65954method (*MultiHandler) WithGroup(string) Handler#65954type MultiHandler struct#65954
net
method (*Dialer) DialIP(context.Context, string, netip.Addr, netip.Addr) (*IPConn, error)#49097method (*Dialer) DialTCP(context.Context, string, netip.AddrPort, netip.AddrPort) (*TCPConn, error)#49097method (*Dialer) DialUDP(context.Context, string, netip.AddrPort, netip.AddrPort) (*UDPConn, error)#49097method (*Dialer) DialUnix(context.Context, string, *UnixAddr, *UnixAddr) (*UnixConn, error)#49097
net/http
method (*ClientConn) Available() int#75772method (*ClientConn) Close() error#75772method (*ClientConn) Err() error#75772method (*ClientConn) InFlight() int#75772method (*ClientConn) Release()#75772method (*ClientConn) Reserve() error#75772method (*ClientConn) RoundTrip(*Request) (*Response, error)#75772method (*ClientConn) SetStateHook(func(*ClientConn))#75772method (*Transport) NewClientConn(context.Context, string, string) (*ClientConn, error)#75772type ClientConn struct#75772type HTTP2Config struct, StrictMaxConcurrentRequests bool#67813
net/http/httputil
type ReverseProxy struct, Director //deprecated#73161
net/netip
method (Prefix) Compare(Prefix) int#61642
os
method (*Process) WithHandle(func(uintptr)) error#70352var ErrNoHandle error#70352
reflect
method (Value) Fields() iter.Seq2[StructField, Value]#66631method (Value) Methods() iter.Seq2[Method, Value]#66631type Type interface, Fields() iter.Seq[StructField]#66631type Type interface, Ins() iter.Seq[Type]#66631type Type interface, Methods() iter.Seq[Method]#66631type Type interface, Outs() iter.Seq[Type]#66631
testing
method (*B) ArtifactDir() string#71287method (*F) ArtifactDir() string#71287method (*T) ArtifactDir() string#71287type TB interface, ArtifactDir() string#71287
testing/cryptotest
func SetGlobalRandom(*testing.T, uint64)#70942
CC @aclements, @ianlancetaylor, @golang/release.
Related Issues
- api: audit for Go 1.24 #70701 (closed)
- api: audit for Go 1.25 #73918 (closed)
- api: audit for Go 1.21 #60560 (closed)
- api: audit for Go 1.20 #57126 (closed)
- api: audit for Go 1.23 #67843 (closed)
- api: audit for Go 1.15 go1.15.txt #39489 (closed)
- api: audit for Go 1.22 #64343 (closed)
- api: audit for Go 1.19 #53310 (closed)
- api: audit for Go 1.18 #51333 (closed)
- api: audit for Go 1.17 #46688 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
crypto/ APIs look correct to me.
bytes, debug/elf, os, reflect, and testing looks good to me.
remaining:
- net
- log
- go (ast, token)
- errors
- database
API audit complete. I opened one question about the database/sql change, so (unfortunately) I'm going to leave this issue open for the moment.
We decided to back out the database/sql/driver change, so the API audit is complete.