goics icon indicating copy to clipboard operation
goics copied to clipboard

Add a getter to Elements decoded.. for avoiding to test if prop exists in map.

Open jordic opened this issue 9 years ago • 0 comments

When decoding a ical, inside the consumer:

ev := &Event{
            Start: start,
            End: end,
            UID: node["UID"].Val,
            Summary: node["SUMMARY"].Val,
        }

If Node["SUMMARY"] don't esists, its a nil pointer.. Provide a node.Get("SUMMARY"), just to test or return ""..

jordic avatar Mar 28 '15 05:03 jordic