From b416f22afb6f429ade710fa41dc951a027ce8737 Mon Sep 17 00:00:00 2001 From: Tom Harwood Date: Mon, 19 Feb 2024 19:16:56 +0000 Subject: [PATCH] Improve NewVCardWithOptions() documentation --- vcard.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vcard.go b/vcard.go index e131e3e..a1f3695 100644 --- a/vcard.go +++ b/vcard.go @@ -150,7 +150,12 @@ func NewVCard(jsonBlob []byte) (*VCard, error) { return vcard, err } -// NewVCardWithOptions creates a VCard from jsonBlob. +// NewVCardWithOptions creates a VCard from jsonBlob. options specifies options for +// the VCard decoder. +// +// Example usage: +// +// vcard, err := NewVCardWithOptions(jsonBlob, VCardOptions{IgnoreInvalidProperties: true}) func NewVCardWithOptions(jsonBlob []byte, options VCardOptions) (*VCard, error) { var top []interface{} err := json.Unmarshal(jsonBlob, &top)