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: 1 day 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T21:38:15.000Z (about 2 months ago)
- Last Synced: 2024-12-13T19:13:32.975Z (8 days ago)
- Topics: contacts, vcard
- Language: Go
- Size: 85 KB
- Stars: 108
- Watchers: 6
- Forks: 34
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - go-vcard - Parse and format vCard. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - go-vcard - A Go library to parse and format vCard - ★ 13 (Text Processing)
- awesome-go-extra - go-vcard - 03-21T08:30:36Z|2022-05-07T12:26:42Z| (Bot Building / Parsers/Encoders/Decoders)
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