1 // Copyright 2023 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
15 "internal/trace/v2/testtrace"
20 fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s\n", os.Args[0])
21 fmt.Fprintf(flag.CommandLine.Output(), "\n")
22 fmt.Fprintf(flag.CommandLine.Output(), "Accepts a trace at stdin and validates it.\n")
28 var logEvents = flag.Bool("log-events", false, "whether to log events")
33 r, err := trace.NewReader(os.Stdin)
37 v := testtrace.NewValidator()
39 ev, err := r.ReadEvent()
47 log.Println(ev.String())
49 if err := v.Event(ev); err != nil {