diff --git a/cmd/csaf_checker/main.go b/cmd/csaf_checker/main.go new file mode 100644 index 0000000..78f8c9a --- /dev/null +++ b/cmd/csaf_checker/main.go @@ -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 + +} diff --git a/cmd/csaf_checker/report.go b/cmd/csaf_checker/report.go new file mode 100644 index 0000000..afb48bf --- /dev/null +++ b/cmd/csaf_checker/report.go @@ -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 +}