1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

Started with main of checker.

This commit is contained in:
Sascha L. Teichmann 2021-12-09 01:37:16 +01:00
parent 8c64e03507
commit 6692e45644
2 changed files with 46 additions and 0 deletions

30
cmd/csaf_checker/main.go Normal file
View file

@ -0,0 +1,30 @@
package main
import (
"os"
"github.com/jessevdk/go-flags"
)
type options struct {
Output string `short:"o" long:"output" description:"File name of the generated report" value-name:"REPORT-FILE"`
}
func checkParser(err error) {
if err != nil {
if e, ok := err.(*flags.Error); ok && e.Type == flags.ErrHelp {
os.Exit(0)
}
os.Exit(1)
}
}
func main() {
var opts options
args, err := flags.Parse(&opts)
checkParser(err)
_ = args
}

View file

@ -0,0 +1,16 @@
package main
type Requirement struct {
Num int
Description string
Messages []string
}
type domain struct {
Name string
Requirements []Requirement
}
type report struct {
Domains []domain
}