blob: 9bd2e8c94ea7c311d5a7ce7af2805ee424fba144 [file] [log] [blame]
// Copyright 2015 The Vanadium 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 "go.fuchsia.dev/jiri/cmdline"
// cmdNested represents the nested command.
var cmdNested = &cmdline.Command{
Name: "nested",
Short: "Short description of command nested",
Long: "Long description of command nested.",
LookPath: true,
Children: []*cmdline.Command{cmdChild},
}
// cmdChild represents the child command.
var cmdChild = &cmdline.Command{
Runner: cmdline.RunnerFunc(runChild),
Name: "child",
Short: "Short description of command child",
Long: "Long description of command child.",
}
func runChild(env *cmdline.Env, _ []string) error {
return env.UsageErrorf("wombats!")
}
func main() {
cmdline.Main(cmdNested)
}