Skip to content

Commit 2cc4218

Browse files
timothy-kingGo LUCI
authored and
Go LUCI
committed
internal/gcimporter: moving byPath code location
Moves the location of byPath. This minimizes the difference with $GOROOT/src/go/internal/gcimporter/gcimporter.go . Change-Id: I6f6e0fe0f824781939346e0014a5604fde9e5c2e Reviewed-on: https://go-review.googlesource.com/c/tools/+/633656 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]> Commit-Queue: Tim King <[email protected]>
1 parent 6ebf95a commit 2cc4218

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/gcimporter/gcimporter.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,3 @@ func Import(fset *token.FileSet, packages map[string]*types.Package, path, srcDi
252252
return nil, fmt.Errorf("unexpected export data with prefix %q for path %s", string(data[:l]), id)
253253
}
254254
}
255-
256-
type byPath []*types.Package
257-
258-
func (a byPath) Len() int { return len(a) }
259-
func (a byPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
260-
func (a byPath) Less(i, j int) bool { return a[i].Path() < a[j].Path() }

internal/gcimporter/iimport.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,3 +1111,9 @@ func (r *importReader) byte() byte {
11111111
}
11121112
return x
11131113
}
1114+
1115+
type byPath []*types.Package
1116+
1117+
func (a byPath) Len() int { return len(a) }
1118+
func (a byPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
1119+
func (a byPath) Less(i, j int) bool { return a[i].Path() < a[j].Path() }

0 commit comments

Comments
 (0)