go icon indicating copy to clipboard operation
go copied to clipboard

api: audit for Go 1.26

Open gopherbot opened this issue 3 weeks ago • 5 comments

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 } #75300
  • type Decapsulator interface, Decapsulate([]uint8) ([]uint8, error) #75300
  • type Decapsulator interface, Encapsulator() Encapsulator #75300
  • type Encapsulator interface { Bytes, Encapsulate } #75300
  • type Encapsulator interface, Bytes() []uint8 #75300
  • type Encapsulator interface, Encapsulate() ([]uint8, []uint8) #75300

crypto/ecdh

  • type KeyExchanger interface { Curve, ECDH, PublicKey } #75300
  • type KeyExchanger interface, Curve() Curve #75300
  • type KeyExchanger interface, ECDH(*PublicKey) ([]uint8, error) #75300
  • type KeyExchanger interface, PublicKey() *PublicKey #75300

crypto/ecdsa

  • type PrivateKey struct, D //deprecated #63963
  • type PublicKey struct, X //deprecated #63963
  • type PublicKey struct, Y //deprecated #63963

crypto/fips140

  • func Enforced() bool #74630
  • func Version() string #75301
  • func WithoutEnforcement(func()) #74630

crypto/hpke

  • func AES128GCM() AEAD #75300
  • func AES256GCM() AEAD #75300
  • func ChaCha20Poly1305() AEAD #75300
  • func DHKEM(ecdh.Curve) KEM #75300
  • func ExportOnly() AEAD #75300
  • func HKDFSHA256() KDF #75300
  • func HKDFSHA384() KDF #75300
  • func HKDFSHA512() KDF #75300
  • func MLKEM1024() KEM #75300
  • func MLKEM1024P384() KEM #75300
  • func MLKEM768() KEM #75300
  • func MLKEM768P256() KEM #75300
  • func MLKEM768X25519() KEM #75300
  • func NewAEAD(uint16) (AEAD, error) #75300
  • func NewDHKEMPrivateKey(ecdh.KeyExchanger) (PrivateKey, error) #75300
  • func NewDHKEMPublicKey(*ecdh.PublicKey) (PublicKey, error) #75300
  • func NewHybridPrivateKey(crypto.Decapsulator, ecdh.KeyExchanger) (PrivateKey, error) #75300
  • func NewHybridPublicKey(crypto.Encapsulator, *ecdh.PublicKey) (PublicKey, error) #75300
  • func NewKDF(uint16) (KDF, error) #75300
  • func NewKEM(uint16) (KEM, error) #75300
  • func NewMLKEMPrivateKey(crypto.Decapsulator) (PrivateKey, error) #75300
  • func NewMLKEMPublicKey(crypto.Encapsulator) (PublicKey, error) #75300
  • func NewRecipient([]uint8, PrivateKey, KDF, AEAD, []uint8) (*Recipient, error) #75300
  • func NewSender(PublicKey, KDF, AEAD, []uint8) ([]uint8, *Sender, error) #75300
  • func Open(PrivateKey, KDF, AEAD, []uint8, []uint8) ([]uint8, error) #75300
  • func SHAKE128() KDF #75300
  • func SHAKE256() KDF #75300
  • func Seal(PublicKey, KDF, AEAD, []uint8, []uint8) ([]uint8, error) #75300
  • method (*Recipient) Export(string, int) ([]uint8, error) #75300
  • method (*Recipient) Open([]uint8, []uint8) ([]uint8, error) #75300
  • method (*Sender) Export(string, int) ([]uint8, error) #75300
  • method (*Sender) Seal([]uint8, []uint8) ([]uint8, error) #75300
  • type AEAD interface, ID() uint16 #75300
  • type AEAD interface, unexported methods #75300
  • type KDF interface, ID() uint16 #75300
  • type KDF interface, unexported methods #75300
  • type KEM interface, DeriveKeyPair([]uint8) (PrivateKey, error) #75300
  • type KEM interface, GenerateKey() (PrivateKey, error) #75300
  • type KEM interface, ID() uint16 #75300
  • type KEM interface, NewPrivateKey([]uint8) (PrivateKey, error) #75300
  • type KEM interface, NewPublicKey([]uint8) (PublicKey, error) #75300
  • type KEM interface, unexported methods #75300
  • type PrivateKey interface, Bytes() ([]uint8, error) #75300
  • type PrivateKey interface, KEM() KEM #75300
  • type PrivateKey interface, PublicKey() PublicKey #75300
  • type PrivateKey interface, unexported methods #75300
  • type PublicKey interface, Bytes() []uint8 #75300
  • type PublicKey interface, KEM() KEM #75300
  • type PublicKey interface, unexported methods #75300
  • type Recipient struct #75300
  • type Sender struct #75300

crypto/mlkem

  • method (*DecapsulationKey1024) Encapsulator() crypto.Encapsulator #75300
  • method (*DecapsulationKey768) Encapsulator() crypto.Encapsulator #75300

crypto/mlkem/mlkemtest

  • func Encapsulate1024(*mlkem.EncapsulationKey1024, []uint8) ([]uint8, []uint8, error) #73627
  • func Encapsulate768(*mlkem.EncapsulationKey768, []uint8) ([]uint8, []uint8, error) #73627

crypto/rsa

  • func DecryptPKCS1v15 //deprecated #75302
  • func DecryptPKCS1v15SessionKey //deprecated #75302
  • func EncryptOAEPWithOptions(io.Reader, *PublicKey, []uint8, *OAEPOptions) ([]uint8, error) #65716
  • func EncryptPKCS1v15 //deprecated #75302
  • type PKCS1v15DecryptOptions //deprecated #75302

crypto/tls

  • const QUICErrorEvent = 10 #75108
  • const QUICErrorEvent QUICEventKind #75108
  • const SecP256r1MLKEM768 = 4587 #71206
  • const SecP256r1MLKEM768 CurveID #71206
  • const SecP384r1MLKEM1024 = 4589 #71206
  • const SecP384r1MLKEM1024 CurveID #71206
  • type ClientHelloInfo struct, HelloRetryRequest bool #74425
  • type ConnectionState struct, HelloRetryRequest bool #74425
  • type QUICEvent struct, Err error #75108

crypto/x509

  • func OIDFromASN1OID(asn1.ObjectIdentifier) (OID, error) #75325
  • method (ExtKeyUsage) OID() OID #75325
  • method (ExtKeyUsage) String() string #56866
  • method (KeyUsage) String() string #56866

database/sql/driver

  • type RowsColumnScanner interface { Close, Columns, Next, ScanColumn } #67546
  • type RowsColumnScanner interface, Close() error #67546
  • type RowsColumnScanner interface, Columns() []string #67546
  • type RowsColumnScanner interface, Next([]Value) error #67546
  • type RowsColumnScanner interface, ScanColumn(interface{}, int) error #67546

debug/elf

  • const R_LARCH_CALL36 = 110 #75562
  • const R_LARCH_CALL36 R_LARCH #75562
  • const R_LARCH_TLS_DESC32 = 13 #75562
  • const R_LARCH_TLS_DESC32 R_LARCH #75562
  • const R_LARCH_TLS_DESC64 = 14 #75562
  • const R_LARCH_TLS_DESC64 R_LARCH #75562
  • const R_LARCH_TLS_DESC64_HI12 = 118 #75562
  • const R_LARCH_TLS_DESC64_HI12 R_LARCH #75562
  • const R_LARCH_TLS_DESC64_LO20 = 117 #75562
  • const R_LARCH_TLS_DESC64_LO20 R_LARCH #75562
  • const R_LARCH_TLS_DESC64_PC_HI12 = 114 #75562
  • const R_LARCH_TLS_DESC64_PC_HI12 R_LARCH #75562
  • const R_LARCH_TLS_DESC64_PC_LO20 = 113 #75562
  • const R_LARCH_TLS_DESC64_PC_LO20 R_LARCH #75562
  • const R_LARCH_TLS_DESC_CALL = 120 #75562
  • const R_LARCH_TLS_DESC_CALL R_LARCH #75562
  • const R_LARCH_TLS_DESC_HI20 = 115 #75562
  • const R_LARCH_TLS_DESC_HI20 R_LARCH #75562
  • const R_LARCH_TLS_DESC_LD = 119 #75562
  • const R_LARCH_TLS_DESC_LD R_LARCH #75562
  • const R_LARCH_TLS_DESC_LO12 = 116 #75562
  • const R_LARCH_TLS_DESC_LO12 R_LARCH #75562
  • const R_LARCH_TLS_DESC_PCREL20_S2 = 126 #75562
  • const R_LARCH_TLS_DESC_PCREL20_S2 R_LARCH #75562
  • const R_LARCH_TLS_DESC_PC_HI20 = 111 #75562
  • const R_LARCH_TLS_DESC_PC_HI20 R_LARCH #75562
  • const R_LARCH_TLS_DESC_PC_LO12 = 112 #75562
  • const R_LARCH_TLS_DESC_PC_LO12 R_LARCH #75562
  • const R_LARCH_TLS_GD_PCREL20_S2 = 125 #75562
  • const R_LARCH_TLS_GD_PCREL20_S2 R_LARCH #75562
  • const R_LARCH_TLS_LD_PCREL20_S2 = 124 #75562
  • const R_LARCH_TLS_LD_PCREL20_S2 R_LARCH #75562
  • const R_LARCH_TLS_LE_ADD_R = 122 #75562
  • const R_LARCH_TLS_LE_ADD_R R_LARCH #75562
  • const R_LARCH_TLS_LE_HI20_R = 121 #75562
  • const R_LARCH_TLS_LE_HI20_R R_LARCH #75562
  • const R_LARCH_TLS_LE_LO12_R = 123 #75562
  • const 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) #68021
  • method (*Directive) End() token.Pos #68021
  • method (*Directive) ParseArgs() ([]DirectiveArg, error) #68021
  • method (*Directive) Pos() token.Pos #68021
  • type BasicLit struct, ValueEnd token.Pos #76031
  • type Directive struct #68021
  • type Directive struct, Args string #68021
  • type Directive struct, ArgsPos token.Pos #68021
  • type Directive struct, Name string #68021
  • type Directive struct, Slash token.Pos #68021
  • type Directive struct, Tool string #68021
  • type DirectiveArg struct #68021
  • type DirectiveArg struct, Arg string #68021
  • type DirectiveArg struct, Pos token.Pos #68021

go/token

  • method (*File) End() Pos #75849

log/slog

  • func NewMultiHandler(...Handler) *MultiHandler #65954
  • method (*MultiHandler) Enabled(context.Context, Level) bool #65954
  • method (*MultiHandler) Handle(context.Context, Record) error #65954
  • method (*MultiHandler) WithAttrs([]Attr) Handler #65954
  • method (*MultiHandler) WithGroup(string) Handler #65954
  • type MultiHandler struct #65954

net

  • method (*Dialer) DialIP(context.Context, string, netip.Addr, netip.Addr) (*IPConn, error) #49097
  • method (*Dialer) DialTCP(context.Context, string, netip.AddrPort, netip.AddrPort) (*TCPConn, error) #49097
  • method (*Dialer) DialUDP(context.Context, string, netip.AddrPort, netip.AddrPort) (*UDPConn, error) #49097
  • method (*Dialer) DialUnix(context.Context, string, *UnixAddr, *UnixAddr) (*UnixConn, error) #49097

net/http

  • method (*ClientConn) Available() int #75772
  • method (*ClientConn) Close() error #75772
  • method (*ClientConn) Err() error #75772
  • method (*ClientConn) InFlight() int #75772
  • method (*ClientConn) Release() #75772
  • method (*ClientConn) Reserve() error #75772
  • method (*ClientConn) RoundTrip(*Request) (*Response, error) #75772
  • method (*ClientConn) SetStateHook(func(*ClientConn)) #75772
  • method (*Transport) NewClientConn(context.Context, string, string) (*ClientConn, error) #75772
  • type ClientConn struct #75772
  • type 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 #70352
  • var ErrNoHandle error #70352

reflect

  • method (Value) Fields() iter.Seq2[StructField, Value] #66631
  • method (Value) Methods() iter.Seq2[Method, Value] #66631
  • type Type interface, Fields() iter.Seq[StructField] #66631
  • type Type interface, Ins() iter.Seq[Type] #66631
  • type Type interface, Methods() iter.Seq[Method] #66631
  • type Type interface, Outs() iter.Seq[Type] #66631

testing

  • method (*B) ArtifactDir() string #71287
  • method (*F) ArtifactDir() string #71287
  • method (*T) ArtifactDir() string #71287
  • type TB interface, ArtifactDir() string #71287

testing/cryptotest

  • func SetGlobalRandom(*testing.T, uint64) #70942

CC @aclements, @ianlancetaylor, @golang/release.

gopherbot avatar Dec 03 '25 16:12 gopherbot

crypto/ APIs look correct to me.

rolandshoemaker avatar Dec 09 '25 17:12 rolandshoemaker

bytes, debug/elf, os, reflect, and testing looks good to me.

cherrymui avatar Dec 09 '25 17:12 cherrymui

remaining:

  • net
  • log
  • go (ast, token)
  • errors
  • database

dr2chase avatar Dec 09 '25 18:12 dr2chase

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.

aclements avatar Dec 09 '25 22:12 aclements

We decided to back out the database/sql/driver change, so the API audit is complete.

aclements avatar Dec 11 '25 21:12 aclements