mirror of
https://github.com/ivuorinen/go-test-sarif.git
synced 2026-02-19 22:51:52 +00:00
feat: the app (#2)
This commit is contained in:
25
cmd/main.go
Normal file
25
cmd/main.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// main package contains the cli functionality
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/ivuorinen/go-test-sarif/internal"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if len(os.Args) < 3 {
|
||||
fmt.Println("Usage: go-test-sarif <input.json> <output.sarif>")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
inputFile := os.Args[1]
|
||||
outputFile := os.Args[2]
|
||||
|
||||
err := internal.ConvertToSARIF(inputFile, outputFile)
|
||||
if err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user