Skip to content

Commit 24a2b03

Browse files
committed
drop x/sys/execabs in favor of os/exec
Per https://go.dev/doc/go1.19#os-exec-path, Go already has the new safe behavior since version 1.19, and we now require that version as a minimum.
1 parent 3383f84 commit 24a2b03

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

gofmt.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ import (
1717
"io"
1818
"io/fs"
1919
"os"
20+
"os/exec"
2021
"path/filepath"
2122
"regexp"
2223
"runtime"
2324
"runtime/pprof"
2425
"strings"
2526
"sync"
2627

27-
// TODO: we can soon use os/exec thanks to
28-
// https://go.dev/issue/43724
2928
"golang.org/x/sync/semaphore"
30-
exec "golang.org/x/sys/execabs"
3129

3230
gformat "mvdan.cc/gofumpt/format"
3331
"mvdan.cc/gofumpt/internal/govendor/diff"

main_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"encoding/json"
88
"flag"
99
"os"
10+
"os/exec"
1011
"path/filepath"
1112
"testing"
1213

1314
qt "github.com/frankban/quicktest"
14-
exec "golang.org/x/sys/execabs"
1515

1616
"github.com/rogpeppe/go-internal/gotooltest"
1717
"github.com/rogpeppe/go-internal/testscript"

0 commit comments

Comments
 (0)