Skip to content

Commit

Permalink
Define a report package with core and per format sub-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 committed May 6, 2021
1 parent cc83d4c commit ddfa253
Show file tree
Hide file tree
Showing 24 changed files with 524 additions and 437 deletions.
6 changes: 3 additions & 3 deletions cmd/gosec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"

"github.com/securego/gosec/v2"
"github.com/securego/gosec/v2/output"
"github.com/securego/gosec/v2/report"
"github.com/securego/gosec/v2/rules"
)

Expand Down Expand Up @@ -202,12 +202,12 @@ func saveOutput(filename, format string, color bool, paths []string, issues []*g
return err
}
defer outfile.Close() // #nosec G307
err = output.CreateReport(outfile, format, color, rootPaths, issues, metrics, errors)
err = report.CreateReport(outfile, format, color, rootPaths, issues, metrics, errors)
if err != nil {
return err
}
} else {
err := output.CreateReport(os.Stdout, format, color, rootPaths, issues, metrics, errors)
err := report.CreateReport(os.Stdout, format, color, rootPaths, issues, metrics, errors)
if err != nil {
return err
}
Expand Down
326 changes: 0 additions & 326 deletions output/formatter.go

This file was deleted.

0 comments on commit ddfa253

Please sign in to comment.