Skip to content

Commit

Permalink
Improve NewVCardWithOptions() documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
skip2 committed Feb 19, 2024
1 parent 79e3d52 commit b416f22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vcard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b416f22

Please sign in to comment.