forked from vektra/mockery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request vektra#93 from IvanMalison/handle_vendor_imports
Refactor import generation to be much more robust
- Loading branch information
Showing
11 changed files
with
714 additions
and
486 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,3 @@ | ||
package http | ||
|
||
type MyStruct struct{} |
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 @@ | ||
package test | ||
|
||
import ( | ||
"github.com/vektra/mockery/mockery/fixtures/http" | ||
) | ||
|
||
type HasConflictingNestedImports interface { | ||
RequesterNS | ||
Z() http.MyStruct | ||
} |
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,13 @@ | ||
package test | ||
|
||
import ( | ||
"github.com/vektra/mockery/mockery/fixtures/test" | ||
) | ||
|
||
type C int | ||
|
||
type ImportsSameAsPackage interface { | ||
A() test.B | ||
B() KeyManager | ||
C(C) | ||
} |
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,13 @@ | ||
package test | ||
|
||
import ( | ||
"net/http" | ||
|
||
my_http "github.com/vektra/mockery/mockery/fixtures/http" | ||
) | ||
|
||
// Example is an example | ||
type Example interface { | ||
A() http.Flusher | ||
B(fixtureshttp string) my_http.MyStruct | ||
} |
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,3 @@ | ||
package test | ||
|
||
type B int |
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,3 @@ | ||
package twopackages | ||
|
||
type InMainPackage interface{} |
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,7 @@ | ||
package twopackages_test | ||
|
||
import "net/http" | ||
|
||
type InterfaceInTestPackage interface { | ||
A() http.File | ||
} |
Oops, something went wrong.