Skip to content

Commit 125ba20

Browse files
committed
* merge main
2 parents 5b9bb80 + 451716b commit 125ba20

File tree

1,104 files changed

+42550
-34553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,104 files changed

+42550
-34553
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ Selected packages:
6262

6363
Numerous other packages provide more esoteric functionality.
6464

65-
<!-- Some that didn't make the cut:
65+
<!-- Some that didn't make the cut:
6666
6767
golang.org/x/tools/benchmark/parse
6868
golang.org/x/tools/go/ast/astutil
6969
golang.org/x/tools/go/types/typeutil
70-
golang.org/x/tools/go/vcs
7170
golang.org/x/tools/playground
7271
golang.org/x/tools/present
7372
golang.org/x/tools/refactor/importgraph

cmd/auth/netrcauth/netrcauth.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package main
1616

1717
import (
1818
"fmt"
19-
"io/ioutil"
2019
"log"
2120
"net/http"
2221
"net/url"
@@ -41,7 +40,7 @@ func main() {
4140

4241
path := os.Args[1]
4342

44-
data, err := ioutil.ReadFile(path)
43+
data, err := os.ReadFile(path)
4544
if err != nil {
4645
if os.IsNotExist(err) {
4746
return

cmd/bisect/go119.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2023 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
//go:build !go1.20
6+
7+
package main
8+
9+
import "os/exec"
10+
11+
func cmdInterrupt(cmd *exec.Cmd) {
12+
// cmd.Cancel and cmd.WaitDelay not available before Go 1.20.
13+
}

cmd/bisect/go120.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2023 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
//go:build go1.20
6+
7+
package main
8+
9+
import (
10+
"os"
11+
"os/exec"
12+
"time"
13+
)
14+
15+
func cmdInterrupt(cmd *exec.Cmd) {
16+
cmd.Cancel = func() error {
17+
// On timeout, send interrupt,
18+
// in hopes of shutting down process tree.
19+
// Ignore errors sending signal; it's all best effort
20+
// and not even implemented on Windows.
21+
// TODO(rsc): Maybe use a new process group and kill the whole group?
22+
cmd.Process.Signal(os.Interrupt)
23+
return nil
24+
}
25+
cmd.WaitDelay = 2 * time.Second
26+
}

0 commit comments

Comments
 (0)