| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| package main |
| |
| import ( |
| "context" |
| "flag" |
| "os" |
| |
| "github.com/google/subcommands" |
| ) |
| |
| func main() { |
| subcommands.Register(subcommands.HelpCommand(), "") |
| subcommands.Register(subcommands.FlagsCommand(), "") |
| subcommands.Register(subcommands.CommandsCommand(), "") |
| |
| // TODO(https://fxbug.dev/42102156): Add 'run' command. |
| // TODO(https://fxbug.dev/42102157): Add 'benchmark' command. |
| subcommands.Register(NewCmdRecord(), "") |
| subcommands.Register(NewCmdConvert(), "") |
| |
| flag.Parse() |
| ctx := context.Background() |
| os.Exit(int(subcommands.Execute(ctx))) |
| } |