forked from josharian/impl
-
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.
Update for Go 1.19 and support generics.
Update go.mod to indicate support for Go 1.19. Add support for generic interfaces, i.e. interfaces that accept a type parameter. For example, you can now have this kind of interface: ```go type Interface[Kind any] interface { DoTheThing() Kind } ``` and if you run `impl 's StringImpl' 'Interface[string]` it will generate the following code: ```go func (s StringImpl) DoTheThing() string { // normal impl stub here } ``` Fixes josharian#44.
- Loading branch information
1 parent
2363157
commit b07c7ab
Showing
4 changed files
with
294 additions
and
43 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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
module github.com/josharian/impl | ||
|
||
go 1.14 | ||
go 1.19 | ||
|
||
require golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 | ||
|
||
require ( | ||
golang.org/x/mod v0.2.0 // indirect | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect | ||
) |
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
Oops, something went wrong.