https://github.com/phrase/generics
The missing pieces...
https://github.com/phrase/generics
Last synced: over 1 year ago
JSON representation
The missing pieces...
- Host: GitHub
- URL: https://github.com/phrase/generics
- Owner: phrase
- License: mit
- Created: 2018-04-19T09:21:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-31T15:23:29.000Z (about 8 years ago)
- Last Synced: 2025-02-06T07:13:11.097Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# generics
The missing pieces...
## usage
### First
[embedmd]:# (example_test.go /func example.*/ / end example/)
```go
func exampleFirst(l *log.Logger) {
type Thing struct {
Name string
}
list := []*Thing{
{Name: "Parrot"},
{Name: "PhraseApp"},
}
first := First(list).(*Thing)
l.Printf("%s", first.Name)
} // end example
```