mirror of
https://github.com/mattn/go-generics-example.git
synced 2025-01-22 20:40:23 +08:00
Example code for Go generics
2a1202e922
Fix: list/InsertAt |
||
---|---|---|
add | ||
anonymous-func | ||
benchmark | ||
binary-size | ||
byteseq | ||
comparable | ||
constraints-chan | ||
constraints-slice | ||
constraints-vector | ||
every | ||
exp_maps | ||
exp_slices | ||
filter | ||
foreach | ||
functional-options | ||
generator | ||
interface | ||
list | ||
map | ||
minmax | ||
must | ||
perm | ||
pointerof | ||
reduce | ||
reflect | ||
shuffle | ||
some | ||
splittraintest | ||
ternaryop | ||
tuple | ||
underlying | ||
uniq | ||
.gitignore | ||
build.sh | ||
go.mod | ||
README.md |
go-generics-example
Example code for Go generics.
Usage
$ go build -gcflags=-G=3
Requirements
Go 1.18 or later
Third-party packages that support Generics
- Code-Hex/go-generics-cache An in-memory key:value store/cache library written in Go 1.18 generics
- genkami/dogs Dogs is a library that provides some useful types and functions borrowed from functional languages.
- makiuchi-d/tuple Definition of n-tuple structs using type parameters.
- samber/lo 💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)
- mattn/go-result Something like unwrap in Rust.
- makiuchi-d/linq LINQ for Go with type parameters.
Advertise
Go 言語にやってくる Generics は我々に何をもたらすのか
License
MIT
Author
Yasuhiro Matsumoto (a.k.a. mattn)