fix(xml): remove -format-xml #1068 (#1134)

This commit is contained in:
Kota Kanbe
2021-01-18 04:38:00 +09:00
committed by GitHub
parent affb456499
commit d6435d2885
6 changed files with 5 additions and 53 deletions

View File

@@ -3,7 +3,6 @@ package report
import (
"bytes"
"encoding/json"
"encoding/xml"
"fmt"
"path"
"time"
@@ -92,18 +91,6 @@ func (w S3Writer) Write(rs ...models.ScanResult) (err error) {
return err
}
}
if c.Conf.FormatXML {
k := key + ".xml"
var b []byte
if b, err = xml.Marshal(r); err != nil {
return xerrors.Errorf("Failed to Marshal to XML: %w", err)
}
allBytes := bytes.Join([][]byte{[]byte(xml.Header + vulsOpenTag), b, []byte(vulsCloseTag)}, []byte{})
if err := putObject(svc, k, allBytes); err != nil {
return err
}
}
}
return nil
}