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

Method WriteDsdx

opensca/model/dsdx.go:79–90  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

77}
78
79func (doc *DsdxDocument) WriteDsdx(w io.Writer) error {
80 tmpl, err := template.New("tagValue").Funcs(template.FuncMap{
81 "tojson": func(o any) string {
82 data, _ := json.Marshal(o)
83 return string(data)
84 },
85 }).Parse(dsdxtpl)
86 if err != nil {
87 return err
88 }
89 return tmpl.Execute(w, doc)
90}
91
92const dsdxtpl = `Name: {{ .Name }}
93DSDXVersion: {{ .DSDXVersion }}

Callers 1

DsdxFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected