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