aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2023-07-05 12:08:51 -0400
committerRuss Cox <rsc@golang.org>2023-07-06 13:09:19 +0000
commitb490bdc27d5576e5ccdac33755c0156d609e1bb9 (patch)
tree322ea08dc4d914893473d5f715dc184929cac241 /src/database/sql
parent36ea4f9680f8296f1c7d0cf7dbb1b3a9d572754a (diff)
downloadgo-b490bdc27d5576e5ccdac33755c0156d609e1bb9.tar.xz
go/types: record Config.GoVersion for reporting in Package.GoVersion method
Clients of go/types, such as analyzers, may need to know which specific Go version a package is written for. Record that information in the Package and expose it using the new GoVersion method. Update parseGoVersion to handle the new Go versions that may be passed around starting in Go 1.21.0: versions like "go1.21.0" and "go1.21rc2". This is not strictly necessary today, but it adds some valuable future-proofing. While we are here, change NewChecker from panicking on invalid version to saving an error for returning later from Files. Go versions are now likely to be coming from a variety of sources, not just hard-coded in calls to NewChecker, making a panic inappropriate. For #61174. Fixes #61175. Change-Id: Ibe41fe207c1b6e71064b1fe448ac55776089c541 Reviewed-on: https://go-review.googlesource.com/c/go/+/507975 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions