Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseEagerly ¶
func ParseEagerly(data []byte) (api.VendorList, error)
ParseEagerly interprets and validates the Vendor List data up front, before returning it. The returned object can be shared safely between goroutines.
This is ideal if:
- You plan to call functions on the returned VendorList many times before discarding it.
- You need strong input validation and good error messages.
Otherwise, you may get better performance with ParseLazily.
func ParseLazily ¶
func ParseLazily(data []byte) api.VendorList
ParseLazily returns a view of the data which re-calculates things on each function call. The returned object can be shared safely between goroutines.
This is ideal if:
- You only need to look up a few vendors or purpose IDs
- You don't need good errors on malformed input
Otherwise, you may get better performance with ParseEagerly.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.