Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
added tool usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tjgurwara99 committed Feb 5, 2023
1 parent 797f937 commit 273f550
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,27 @@ import (
"golang.org/x/vuln/vulncheck"
)

const usage = `%[1]s is a tool for finding publically known vulnerabilities withing your codebase.
This application is a tool to find the publically known vulnerabilities withing
your codebase using the go tools vulncheck library, the same library used to
power the govulncheck tool.
The -o flag forces %[1]s to write the resulting SARIF log to the named
output file, instead of the default behavior of writing the SARIF log
to stdout.
Usage:
%[1]s [-o output] [packages]
Flags:
`

func main() {
outFile := flag.String("o", "", "File to export the SARIF log to. If not specified, the log would be printed to the stdout.")
outFile := flag.String("o", "", "File to export the SARIF log to")
flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), usage, os.Args[0])
flag.PrintDefaults()
}
flag.Parse()
log, err := runVulnny()
if err != nil {
Expand Down

0 comments on commit 273f550

Please sign in to comment.