Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emersion/Go-vcard
A Go library to parse and format vCard
https://github.com/emersion/Go-vcard
contacts vcard
Last synced: 18 days ago
JSON representation
A Go library to parse and format vCard
- Host: GitHub
- URL: https://github.com/emersion/Go-vcard
- Owner: emersion
- License: mit
- Created: 2017-03-21T08:30:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-15T06:28:25.000Z (about 1 year ago)
- Last Synced: 2024-10-15T21:07:43.005Z (27 days ago)
- Topics: contacts, vcard
- Language: Go
- Size: 81.1 KB
- Stars: 106
- Watchers: 6
- Forks: 31
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-vcard
[![Go Reference](https://pkg.go.dev/badge/github.com/emersion/go-vcard.svg)](https://pkg.go.dev/github.com/emersion/go-vcard)
[![builds.sr.ht status](https://builds.sr.ht/~emersion/go-vcard/commits.svg)](https://builds.sr.ht/~emersion/go-vcard/commits?)A Go library to parse and format [vCard](https://tools.ietf.org/html/rfc6350).
## Usage
```go
f, err := os.Open("cards.vcf")
if err != nil {
log.Fatal(err)
}
defer f.Close()dec := vcard.NewDecoder(f)
for {
card, err := dec.Decode()
if err == io.EOF {
break
} else if err != nil {
log.Fatal(err)
}log.Println(card.PreferredValue(vcard.FieldFormattedName))
}
```## License
MIT