mirror of
https://github.com/securego/gosec.git
synced 2024-11-06 03:55:50 +00:00
remove panic
This commit is contained in:
parent
66e7c8d8f8
commit
4cd14f9068
1 changed files with 2 additions and 9 deletions
|
@ -130,26 +130,19 @@ func reportSonarqube(rootPath string, w io.Writer, data *reportInfo) error {
|
|||
}
|
||||
raw, err := json.MarshalIndent(si, "", "\t")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = w.Write(raw)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func reportJSON(w io.Writer, data *reportInfo) error {
|
||||
raw, err := json.MarshalIndent(data, "", "\t")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = w.Write(raw)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue