mirror of
https://github.com/securego/gosec.git
synced 2024-11-06 12:05:52 +00:00
18 lines
315 B
Go
18 lines
315 B
Go
package yaml
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/securego/gosec/v2"
|
|
"gopkg.in/yaml.v3"
|
|
)
|
|
|
|
// WriteReport write a report in yaml format to the output writer
|
|
func WriteReport(w io.Writer, data *gosec.ReportInfo) error {
|
|
raw, err := yaml.Marshal(data)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = w.Write(raw)
|
|
return err
|
|
}
|