https://github.com/emersion/go-vcard
A Go library to parse and format vCard
https://github.com/emersion/go-vcard
contacts vcard
Last synced: 6 months 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 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T21:38:15.000Z (about 1 year ago)
- Last Synced: 2025-05-14T00:02:00.963Z (6 months ago)
- Topics: contacts, vcard
- Language: Go
- Size: 85 KB
- Stars: 114
- Watchers: 5
- Forks: 36
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - go-vcard - A Go library to parse and format vCard - ★ 13 (Text Processing)
- awesome-go - go-vcard - Parse and format vCard. (Text Processing / Advanced Console UIs)
- awesome-go-extra - go-vcard - 03-21T08:30:36Z|2022-05-07T12:26:42Z| (Bot Building / Parsers/Encoders/Decoders)
- awesome-go-cn - go-vcard
- awesome-go-cn - go-vcard - vcard) (文本处理 / 解析 器/Encoders/Decoders)
- awesome-go-plus - go-vcard - Parse and format vCard.  (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - go-vcard - Parse and format vCard. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - go-vcard - | - | - | (Text Processing / HTTP Clients)
- awesome-go - go-vcard - Parse and format vCard. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go-with-stars - go-vcard - Parse and format vCard. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - emersion/go-vcard
- awesome-go - go-vcard - Parse and format vCard. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - go-vcard - Parse and format vCard. (Text Processing / Parsers/Encoders/Decoders)
- awesome-Char - go-vcard - Parse and format vCard. (Text Processing / HTTP Clients)
- zero-alloc-awesome-go - go-vcard - Parse and format vCard. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go-cn - go-vcard - vcard) (文本处理 / 解析 器/Encoders/Decoders)
- awesome-go - go-vcard - Parse and format vCard. (Text Processing / HTTP Clients)
README
# go-vcard
[](https://pkg.go.dev/github.com/emersion/go-vcard)
[](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