Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add consumer migration tool #226

Merged
merged 18 commits into from
Mar 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cmd/migrate: add support for XTestGoFiles
This is for files that use `package packagename_test` to declare a 
segregated test package in the same folder.
Jorropo authored and guseggert committed Mar 27, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
guseggert Gus Eggert
commit ac0938bc979283135d10e062c36a68f8e9314fc9
3 changes: 2 additions & 1 deletion cmd/migrate/internal/json.go
Original file line number Diff line number Diff line change
@@ -7,12 +7,13 @@ type pkgJSON struct {
GoFiles []string
IgnoredGoFiles []string
TestGoFiles []string
XTestGoFiles []string
CgoFiles []string
}

func (p *pkgJSON) allSourceFiles() []string {
var files []string
lists := [][]string{p.GoFiles, p.IgnoredGoFiles, p.TestGoFiles, p.CgoFiles}
lists := [...][]string{p.GoFiles, p.IgnoredGoFiles, p.TestGoFiles, p.CgoFiles, p.XTestGoFiles}
for _, l := range lists {
for _, f := range l {
files = append(files, filepath.Join(p.Dir, f))