Skip to content

narqo/test-go-generics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go 1.18 generics use cases

What are generics?

See Type Parameters Proposal.

How to run the examples?

As of today, gotip is the simplest way to run the examples in the repo.

After installing gotip, you can run the examples as usual Go code:

$ gotip test -v ./...
=== RUN   ExampleEqual
--- PASS: ExampleEqual (0.00s)
PASS
ok  	github.com/narqo/test-go-generics/assert	0.123s
=== RUN   ExampleIterator_sliceIterator
--- PASS: ExampleIterator_sliceIterator (0.00s)
=== RUN   ExampleIterator_csvIterator
--- PASS: ExampleIterator_csvIterator (0.00s)
PASS
ok  	github.com/narqo/test-go-generics/iter	0.197s

License

MIT

About

Go 1.18 generics use cases and examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages