feat: the app (#2)

This commit is contained in:
2025-03-24 00:38:41 +02:00
committed by GitHub
parent 3470e255a7
commit e904b1beb3
12 changed files with 416 additions and 123 deletions

25
cmd/main.go Normal file
View 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)
}
}