github.com/btwiuse/jiri@v0.0.0-20191125065820-53353bcfef54/cmdline/testdata/exitcode.go (about) 1 // Copyright 2015 The Vanadium 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. 4 5 package main 6 7 import "github.com/btwiuse/jiri/cmdline" 8 9 // cmdExitCode represents the exitcode command. 10 var cmdExitCode = &cmdline.Command{ 11 Runner: cmdline.RunnerFunc(runExitCode), 12 Name: "exitcode", 13 Short: "Short description of command exitcode", 14 Long: "Long description of command exitcode.", 15 ArgsName: "[args]", 16 ArgsLong: "[args] are ignored", 17 } 18 19 func runExitCode(env *cmdline.Env, _ []string) error { 20 return cmdline.ErrExitCode(42) 21 } 22 23 func main() { 24 cmdline.Main(cmdExitCode) 25 }