func main() { flag.Parse() if *inputFile == "" { log.Fatal("No input file specified") } if *outputFile == "" { *outputFile = *inputFile + ".gen.go" } f, err := os.Open(*inputFile) if err != nil { log.Fatal(err) } defer f.Close() s, err := schema.Parse(f) if err != nil { log.Fatal(err) } if *debug { pretty.Print(s) } output, _ := os.Create(*outputFile) s.(schema.Schema).Generate(output, *packageFile) }
func TestFuzz3(t *testing.T) { input := strings.NewReader("chitin\nv1message\n0\nv0{slots{0\nstring") _, _ = schema.Parse(input) }
func TestFuzz1(t *testing.T) { input := strings.NewReader("chitin\tv1message 0\tv0{slots{}") _, _ = schema.Parse(input) }
func TestFuzz2(t *testing.T) { input := strings.NewReader("chitin\tv1envelope\t0{}") _, _ = schema.Parse(input) }