Upgrade to Go 1.23

Fixes #12763
This commit is contained in:
Bjørn Erik Pedersen
2024-08-14 11:34:21 +02:00
parent b3ad58fa04
commit 2168c5b125
34 changed files with 616 additions and 402 deletions

View File

@@ -147,7 +147,8 @@ func isWrite(flag int) bool {
// TODO(bep) move this to a more suitable place.
func MakeReadableAndRemoveAllModulePkgDir(fs afero.Fs, dir string) (int, error) {
// Safe guard
if !strings.Contains(dir, "pkg") {
// Note that the base directory changed from pkg to gomod_cache in Go 1.23.
if !strings.Contains(dir, "pkg") && !strings.Contains(dir, "gomod") {
panic(fmt.Sprint("invalid dir:", dir))
}