Skip to content

Commit

Permalink
drop x/sys/execabs in favor of os/exec
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mvdan committed Apr 8, 2023
1 parent 3383f84 commit 24a2b03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions gofmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ import (
"io"
"io/fs"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"runtime/pprof"
"strings"
"sync"

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

gformat "mvdan.cc/gofumpt/format"
"mvdan.cc/gofumpt/internal/govendor/diff"
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"encoding/json"
"flag"
"os"
"os/exec"
"path/filepath"
"testing"

qt "github.com/frankban/quicktest"
exec "golang.org/x/sys/execabs"

"github.com/rogpeppe/go-internal/gotooltest"
"github.com/rogpeppe/go-internal/testscript"
Expand Down

0 comments on commit 24a2b03

Please sign in to comment.