Skip to content

A Go library to parse and format vCard

License

Notifications You must be signed in to change notification settings

emersion/go-vcard

Repository files navigation

go-vcard

Go Reference builds.sr.ht status

A Go library to parse and format vCard.

Usage

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

About

A Go library to parse and format vCard

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages