Go: api: audit for Go 1.15 go1.15.txt

Created on 9 Jun 2020  路  5Comments  路  Source: golang/go

CL 237297 introduced the following for Go 1.15:

New API changes for Go 1.15:

CL 225557:

  • [x] pkg bufio, var ErrBadReadCount error

CL 224937:

  • [x] pkg crypto, method (Hash) String() string

CL 217940:

  • [x] pkg crypto/ecdsa, func SignASN1(io.Reader, *PrivateKey, []uint8) ([]uint8, error)
  • [x] pkg crypto/ecdsa, func VerifyASN1(*PublicKey, []uint8, []uint8) bool

CL 231417:

  • [x] pkg crypto/ecdsa, method (*PrivateKey) Equal(crypto.PrivateKey) bool
  • [x] pkg crypto/ed25519, method (PrivateKey) Equal(crypto.PrivateKey) bool
  • [x] pkg crypto/rsa, method (*PrivateKey) Equal(crypto.PrivateKey) bool

CL 223754:

  • [x] pkg crypto/ecdsa, method (*PublicKey) Equal(crypto.PublicKey) bool
  • [x] pkg crypto/ed25519, method (PublicKey) Equal(crypto.PublicKey) bool
  • [x] pkg crypto/rsa, method (*PublicKey) Equal(crypto.PublicKey) bool

CL 202819:

  • [x] pkg crypto/elliptic, func MarshalCompressed(Curve, *big.Int, *big.Int) []uint8
  • [x] pkg crypto/elliptic, func UnmarshalCompressed(Curve, []uint8) (*big.Int, *big.Int)

CL 214977:

  • [x] pkg crypto/tls, method (*Dialer) Dial(string, string) (net.Conn, error)
  • [x] pkg crypto/tls, method (*Dialer) DialContext(context.Context, string, string) (net.Conn, error)
  • [x] pkg crypto/tls, type Dialer struct
  • [x] pkg crypto/tls, type Dialer struct, Config *Config
  • [x] pkg crypto/tls, type Dialer struct, NetDialer *net.Dialer

CL 208226:

  • [x] pkg crypto/tls, method (ClientAuthType) String() string
  • [x] pkg crypto/tls, method (CurveID) String() string
  • [x] pkg crypto/tls, method (SignatureScheme) String() string

CL 229122:

  • [x] pkg crypto/tls, type Config struct, VerifyConnection func(ConnectionState) error

CL 217298:

  • [x] pkg crypto/x509, func CreateRevocationList(io.Reader, *RevocationList, *Certificate, crypto.Signer) ([]uint8, error)
  • [x] pkg crypto/x509, type RevocationList struct
  • [x] pkg crypto/x509, type RevocationList struct, ExtraExtensions []pkix.Extension
  • [x] pkg crypto/x509, type RevocationList struct, NextUpdate time.Time
  • [x] pkg crypto/x509, type RevocationList struct, Number *big.Int
  • [x] pkg crypto/x509, type RevocationList struct, RevokedCertificates []pkix.RevokedCertificate
  • [x] pkg crypto/x509, type RevocationList struct, SignatureAlgorithm SignatureAlgorithm
  • [x] pkg crypto/x509, type RevocationList struct, ThisUpdate time.Time

CL 145758:

  • [x] pkg database/sql, method (*DB) SetConnMaxIdleTime(time.Duration)
  • [x] pkg database/sql, type DBStats struct, MaxIdleTimeClosed int64

CL 214317:

  • [x] pkg database/sql, method (*Row) Err() error

CL 223963:

  • [x] pkg database/sql/driver, type Validator interface { IsValid }
  • [x] pkg database/sql/driver, type Validator interface, IsValid() bool

CL 222637:

  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 4096
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_APPCONTAINER ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 64
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 128
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_GUARD_CF = 16384
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_GUARD_CF ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 32
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_BIND = 2048
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_BIND ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 512
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_ISOLATION ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_SEH = 1024
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_SEH ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 256
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NX_COMPAT ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 32768
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE ideal-int
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 8192
  • [x] pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_WDM_DRIVER ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_32BIT_MACHINE = 256
  • [x] pkg debug/pe, const IMAGE_FILE_32BIT_MACHINE ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_AGGRESIVE_WS_TRIM = 16
  • [x] pkg debug/pe, const IMAGE_FILE_AGGRESIVE_WS_TRIM ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_BYTES_REVERSED_HI = 32768
  • [x] pkg debug/pe, const IMAGE_FILE_BYTES_REVERSED_HI ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_BYTES_REVERSED_LO = 128
  • [x] pkg debug/pe, const IMAGE_FILE_BYTES_REVERSED_LO ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_DEBUG_STRIPPED = 512
  • [x] pkg debug/pe, const IMAGE_FILE_DEBUG_STRIPPED ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_DLL = 8192
  • [x] pkg debug/pe, const IMAGE_FILE_DLL ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_EXECUTABLE_IMAGE = 2
  • [x] pkg debug/pe, const IMAGE_FILE_EXECUTABLE_IMAGE ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_LARGE_ADDRESS_AWARE = 32
  • [x] pkg debug/pe, const IMAGE_FILE_LARGE_ADDRESS_AWARE ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_LINE_NUMS_STRIPPED = 4
  • [x] pkg debug/pe, const IMAGE_FILE_LINE_NUMS_STRIPPED ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_LOCAL_SYMS_STRIPPED = 8
  • [x] pkg debug/pe, const IMAGE_FILE_LOCAL_SYMS_STRIPPED ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_NET_RUN_FROM_SWAP = 2048
  • [x] pkg debug/pe, const IMAGE_FILE_NET_RUN_FROM_SWAP ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_RELOCS_STRIPPED = 1
  • [x] pkg debug/pe, const IMAGE_FILE_RELOCS_STRIPPED ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 1024
  • [x] pkg debug/pe, const IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_SYSTEM = 4096
  • [x] pkg debug/pe, const IMAGE_FILE_SYSTEM ideal-int
  • [x] pkg debug/pe, const IMAGE_FILE_UP_SYSTEM_ONLY = 16384
  • [x] pkg debug/pe, const IMAGE_FILE_UP_SYSTEM_ONLY ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_APPLICATION = 10
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_APPLICATION ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_ROM = 13
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_ROM ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_NATIVE = 1
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_NATIVE ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_NATIVE_WINDOWS ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_OS2_CUI = 5
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_OS2_CUI ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_POSIX_CUI = 7
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_POSIX_CUI ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_UNKNOWN = 0
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_UNKNOWN ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_CE_GUI ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_CUI = 3
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_CUI ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_GUI = 2
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_GUI ideal-int
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_XBOX = 14
  • [x] pkg debug/pe, const IMAGE_SUBSYSTEM_XBOX ideal-int

CL 231461:

  • [x] pkg go/printer, const StdFormat = 16
  • [x] pkg go/printer, const StdFormat Mode

CL 231459:

  • [x] pkg go/types, type Config struct, UsesCgo bool

CL 230397:

  • [x] pkg math/big, method (*Int) FillBytes([]uint8) []uint8

CL 228641:

  • [x] pkg net, method (*Resolver) LookupIP(context.Context, string, string) ([]IP, error)

CL 227645:

  • [x] pkg net/url, method (*URL) EscapedFragment() string
  • [x] pkg net/url, type URL struct, RawFragment string

CL 207082:

  • [x] pkg net/url, method (*URL) Redacted() string

CL 229101:

  • [x] pkg os, method (*File) ReadFrom(io.Reader) (int64, error)

CL 228645:

  • [x] pkg os, var ErrDeadlineExceeded error

CL 187919:

  • [x] pkg regexp, method (*Regexp) SubexpIndex(string) int

CL 216617:

  • [x] pkg strconv, func FormatComplex(complex128, uint8, int, int) string
  • [x] pkg strconv, func ParseComplex(string, int) (complex128, error)

CL 205899:

  • [x] pkg sync, method (*Map) LoadAndDelete(interface{}) (interface{}, bool)

CL 226877:

  • [x] pkg testing, type TB interface, TempDir() string
  • [x] pkg testing, method (*B) TempDir() string
  • [x] pkg testing, method (*T) TempDir() string

CL 202758:

  • [x] pkg testing, method (*T) Deadline() (time.Time, bool)

CL 220424:

  • [x] pkg time, method (*Ticker) Reset(Duration)

/cc @golang/osp-team

NeedsFix release-blocker

Most helpful comment

bufio.ErrBadReadCount (https://golang.org/cl/225557) did not have a proposal, but is consistent with other errors in the package.

crypto.Hash.String proposal #33430.

crypto/ecdsa ASN1 functions proposal #20544.

The various PublicKey.Equal methods were proposal #21704.
The various PrivateKey.Equal methods were a follow-on bug fix.

crypto/elliptic Compressed methods proposal #34105.

crypto/tls.Dialer proposal #18482.

crypto/tls String methods proposal #35499.

crypto/tls.Config.VerifyConnection proposal #36736.

crypto/x509.RevocationList proposal #35428.

database/sql.DB.SetConnMaxIdleTime proposal #25232.

database/sql.Row.Err proposal #35804.

database/sql/driver.Validator committed without going through the proposal process. Original commit https://golang.org/cl/174122 for #31480, then the type was renamed in https://golang.org/cl/223963 based on a suggestion from @rsc.

The debug/pe constant additions are just filling out more values defined by the object file format. No proposal required.

go/printer.StdFormat (https://golang.org/cl/231461) discussed on #37476, but no actual proposal.

go/types.Config.UsesCgo proposal #16623.

math/big.Int.FillBytes proposal #35833.

net.Resolver.LookupIP proposal #30452.

net/url/URL/EscapedFragment proposal #37776.

net/url.URL.Redacted proposal #34855.

os.File.ReadFrom (https://golang.org/cl/229101) no actual proposal. For #36817.

os.ErrDeadlineExceeded discussed by proposal review committee in #31449.

regexp.Regexp.SubexpIndex proposal #32420.

strconv.FormatComplex, ParseComplex proposal #36771.

sync.Map.LoadAndDelete proposal #33762.

testing.TB.TempDir proposal #35998.

testingT.Deadline proposal #28135.

time.Ticker.Reset proposal #33184.

All 5 comments

bufio.ErrBadReadCount (https://golang.org/cl/225557) did not have a proposal, but is consistent with other errors in the package.

crypto.Hash.String proposal #33430.

crypto/ecdsa ASN1 functions proposal #20544.

The various PublicKey.Equal methods were proposal #21704.
The various PrivateKey.Equal methods were a follow-on bug fix.

crypto/elliptic Compressed methods proposal #34105.

crypto/tls.Dialer proposal #18482.

crypto/tls String methods proposal #35499.

crypto/tls.Config.VerifyConnection proposal #36736.

crypto/x509.RevocationList proposal #35428.

database/sql.DB.SetConnMaxIdleTime proposal #25232.

database/sql.Row.Err proposal #35804.

database/sql/driver.Validator committed without going through the proposal process. Original commit https://golang.org/cl/174122 for #31480, then the type was renamed in https://golang.org/cl/223963 based on a suggestion from @rsc.

The debug/pe constant additions are just filling out more values defined by the object file format. No proposal required.

go/printer.StdFormat (https://golang.org/cl/231461) discussed on #37476, but no actual proposal.

go/types.Config.UsesCgo proposal #16623.

math/big.Int.FillBytes proposal #35833.

net.Resolver.LookupIP proposal #30452.

net/url/URL/EscapedFragment proposal #37776.

net/url.URL.Redacted proposal #34855.

os.File.ReadFrom (https://golang.org/cl/229101) no actual proposal. For #36817.

os.ErrDeadlineExceeded discussed by proposal review committee in #31449.

regexp.Regexp.SubexpIndex proposal #32420.

strconv.FormatComplex, ParseComplex proposal #36771.

sync.Map.LoadAndDelete proposal #33762.

testing.TB.TempDir proposal #35998.

testingT.Deadline proposal #28135.

time.Ticker.Reset proposal #33184.

Explicitly calling out additions in 1.15 that were not routine changes and did not go through the proposal review committee. They all look fine to me.

CC @rsc

bufio.ErrBadReadCount (https://golang.org/cl/225557)

database/sql/driver.Validator (https://golang.org/cl/174122, https://golang.org/cl/223963)

go/printer.StdFormat (https://golang.org/cl/231461)

os.(*File).ReadFrom (https://golang.org/cl/229101)

/cc @bradfitz @kardianos for database/sql changes
/cc @griesemer for go/printer
/cc @bradfitz @ianlancetaylor for net
/cc @rsc @robpike @ianlancetaylor @bradfitz @griesemer for os
/cc @rsc for regexp
/cc @rsc @ianlancetaylor @dvyukov @aclements for sync

Please review the new APIs added for Go 1.15, and check off the addition if it is acceptable, ideally having gone through our proposal process (see @ianlancetaylor's comments above). Adding the applicable proposal is welcome if it exists.

Thanks!

I looked over the APIs that @ianlancetaylor flagged above, as well as the entire list. They all look good. Thanks.

Change https://golang.org/cl/240683 mentions this issue: go/printer: remove exported StdFormat flag

Was this page helpful?
0 / 5 - 0 ratings