Update go version

This commit is contained in:
dwrz
2026-08-21 10:23:37 +00:00
parent 78248a6145
commit c2e2d9ea02
466 changed files with 67766 additions and 2881 deletions

View File

@@ -1,12 +0,0 @@
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.23
//go:debug gotypesalias=1
package main
// Materialize aliases whenever the go toolchain version is after 1.23 (#69772).
// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1).

View File

@@ -6,6 +6,7 @@ package main
import (
"context"
"errors"
"fmt"
"os"
@@ -23,11 +24,20 @@ func main() {
if err == nil {
err = cmd.Wait()
}
switch err := err.(type) {
case nil:
case interface{ ExitCode() int }:
os.Exit(err.ExitCode())
default:
if err != nil {
var e interface{ ExitCode() int }
if errors.As(err, &e) {
printErrorToStderr := true
if _, ok := err.(interface{ ExitCode() int }); ok {
// Avoid printing the error to stderr if the exit code error wasn't
// wrapped with another error providing context.
printErrorToStderr = false
}
if printErrorToStderr {
fmt.Fprintln(os.Stderr, err)
}
os.Exit(e.ExitCode())
}
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}