in menuvalidator/main.go [90:105]
func main() {
filename := flag.String("file", "/etc/menu.json", "the menu.json file to validate")
flag.Parse()
entries := read_data(*filename)
//carry out the _whole_ validation and only exit at the end so we can see all the errors
did_fail := recursivelyValidate(&entries, 0)
if did_fail {
fmt.Printf("Validation of %s failed, see above errors for details\n", *filename)
os.Exit(1)
}
fmt.Printf("Validation of %s succeeded!\n", *filename)
os.Exit(0)
}