Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 661 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 661 Bytes

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