Skip to content

Commit 9cbffe3

Browse files
committed
refactor(gofmt): use github.com/rogpeppe/go-internal/diff
1 parent 057b062 commit 9cbffe3

File tree

23 files changed

+13
-779
lines changed

23 files changed

+13
-779
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/golangci/gofmt
33
go 1.22.0
44

55
require (
6+
github.com/rogpeppe/go-internal v1.13.1
67
golang.org/x/sync v0.10.0
78
golang.org/x/tools v0.28.0
89
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
22
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
3+
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
4+
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
35
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
46
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
57
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=

gofmt/gofmt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"strconv"
2525
"strings"
2626

27-
"github.com/golangci/gofmt/gofmt/internal/diff"
27+
"github.com/rogpeppe/go-internal/diff"
2828
"golang.org/x/sync/semaphore"
2929
)
3030

gofmt/gofmt_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"testing"
1414
"text/scanner"
1515

16-
"github.com/golangci/gofmt/gofmt/internal/diff"
16+
"github.com/rogpeppe/go-internal/diff"
1717
)
1818

1919
var update = flag.Bool("update", false, "update .golden files")

gofmt/golangci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"path/filepath"
1212
"sync"
1313

14-
"github.com/golangci/gofmt/gofmt/internal/diff"
14+
"github.com/rogpeppe/go-internal/diff"
1515
)
1616

1717
type Options struct {

gofmt/internal/diff/diff.go

Lines changed: 0 additions & 261 deletions
This file was deleted.

gofmt/internal/diff/diff_test.go

Lines changed: 0 additions & 44 deletions
This file was deleted.

gofmt/internal/diff/testdata/allnew.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

gofmt/internal/diff/testdata/allold.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)