MCPcopy Create free account
hub / github.com/XmirrorSecurity/OpenSCA-cli / Unmarshal

Function Unmarshal

opensca/sca/java/xml/read.go:133–135  ·  view source on GitHub ↗

BUG(rsc): Mapping between XML elements and data structures is inherently flawed: an XML element is an order-dependent collection of anonymous values, while a data structure is an order-independent collection of named values. See package json for a textual representation more suitable to data structu

(data []byte, v any)

Source from the content-addressed store, hash-verified

131// If the field is a slice, a zero value will be appended to the field. Otherwise, the
132// field will be set to its zero value.
133func Unmarshal(data []byte, v any) error {
134 return NewDecoder(bytes.NewReader(data)).Decode(v)
135}
136
137// Decode works like Unmarshal, except it reads the decoder
138// stream to find the start element.

Callers 1

ReadPomFunction · 0.92

Calls 2

NewDecoderFunction · 0.85
DecodeMethod · 0.80

Tested by

no test coverage detected