MCPcopy Create free account
hub / github.com/conforma/cli / marshalVSAReportJSON

Function marshalVSAReportJSON

cmd/validate/vsa.go:1372–1378  ·  view source on GitHub ↗

marshalVSAReportJSON converts VSAReport to JSON

(report VSAReport)

Source from the content-addressed store, hash-verified

1370
1371// marshalVSAReportJSON converts VSAReport to JSON
1372func marshalVSAReportJSON(report VSAReport) ([]byte, error) {
1373 data, err := json.MarshalIndent(&report, "", " ")
1374 if err != nil {
1375 return nil, fmt.Errorf("failed to marshal VSA report to JSON: %w", err)
1376 }
1377 return data, nil
1378}
1379
1380// marshalVSAReportYAML converts VSAReport to YAML
1381func marshalVSAReportYAML(report VSAReport) ([]byte, error) {

Callers 1

convertVSAReportToFormatFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected