A simple vCard generator in Go
by Cathal Garvey, Copyright 2016, Licensed AGPLv3 or later.
This is just a vCard generator in Go, which isn't even entirely compliant. It is based upon vCards JS by Eric J Nesser.
It can be used to create a vCard string simply by creating and assigning to
various properties, then calling card.GetFormattedString()
:
cathal := vcardgen.New()
cathal.FirstName = "Cathal"
cathal.MiddleName = "Joseph"
cathal.LastName = "Garvey"
cathal.CellPhone = "+353863434567"
cathal.Email = "[email protected]"
cathalVcard := cathal.GetFormattedString()
That's it! This isn't a project to be excited or proud of, because vCard is a pile of crap, as formats go. But, it's a common interchange format, so when needs must..