This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issues related to source package imports (#507)
- Loading branch information
Showing
5 changed files
with
124 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Package extra_import makes sure output does not import it. See #515. | ||
package extra_import | ||
|
||
//go:generate mockgen -destination mock.go -package extra_import . Foo | ||
|
||
type Message struct { | ||
Text string | ||
} | ||
|
||
type Foo interface { | ||
Bar(channels []string, message chan<- Message) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
mockgen/internal/tests/missing_import/output/source_mock.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//go:generate mockgen -package source -destination=../output/source_mock.go -source=source.go | ||
|
||
// Package source makes sure output imports its. See #505. | ||
package source | ||
|
||
type Foo struct{} | ||
|
||
type Bar interface { | ||
Baz(Foo) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters