-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27aec33
commit 9a80e3f
Showing
7 changed files
with
580 additions
and
26 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
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,21 @@ | ||
package genericinterface | ||
|
||
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate | ||
|
||
type CustomType any | ||
|
||
//counterfeiter:generate . GenericInterface[T CustomType] | ||
type GenericInterface[T CustomType] interface { | ||
ReturnT() T | ||
TakeT(T) | ||
TakeAndReturnT(T) T | ||
DoSomething() | ||
} | ||
|
||
//counterfeiter:generate . GenericInterface2 | ||
type GenericInterface2[T CustomType] interface { | ||
ReturnT() T | ||
TakeT(T) | ||
TakeAndReturnT(T) T | ||
DoSomething() | ||
} |
245 changes: 245 additions & 0 deletions
245
fixtures/genericinterface/genericinterfacefakes/fake_generic_interface.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.