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

Method Encode

opensca/sca/java/xml/marshal.go:169–175  ·  view source on GitHub ↗

Encode writes the XML encoding of v to the stream. See the documentation for Marshal for details about the conversion of Go values to XML. Encode calls Flush before returning.

(v any)

Source from the content-addressed store, hash-verified

167//
168// Encode calls Flush before returning.
169func (enc *Encoder) Encode(v any) error {
170 err := enc.p.marshalValue(reflect.ValueOf(v), nil, nil)
171 if err != nil {
172 return err
173 }
174 return enc.p.w.Flush()
175}
176
177// EncodeElement writes the XML encoding of v to the stream,
178// using start as the outermost tag in the encoding.

Callers 15

MarshalFunction · 0.95
MarshalIndentFunction · 0.95
BomSWJsonFunction · 0.95
JsonFunction · 0.95
getAesKeyFunction · 0.80
SarifFunction · 0.80
CycloneDXJsonFunction · 0.80
CycloneDXXmlFunction · 0.80
XmlFunction · 0.80
SwidJsonFunction · 0.80
SwidXmlFunction · 0.80
SpdxJsonFunction · 0.80

Calls 2

marshalValueMethod · 0.80
FlushMethod · 0.45

Tested by

no test coverage detected