v.io/jiri@v0.0.0-20160715023856-abfb8b131290/tool/tool.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 tool 6 7 import ( 8 "flag" 9 ) 10 11 // Version identifies the version of a tool. 12 var Version string = "manual-build" 13 14 // Name identifies the name of a tool. 15 var Name string = "" 16 17 var ( 18 // Flags for running commands. 19 ColorFlag bool 20 VerboseFlag bool 21 22 // Flags for working with projects. 23 ManifestFlag string 24 ) 25 26 // InitializeRunFlags initializes flags for running commands. 27 func InitializeRunFlags(flags *flag.FlagSet) { 28 flags.BoolVar(&ColorFlag, "color", true, "Use color to format output.") 29 flags.BoolVar(&VerboseFlag, "v", false, "Print verbose output.") 30 } 31 32 // InitializeRunFlags initializes flags for working with projects. 33 func InitializeProjectFlags(flags *flag.FlagSet) { 34 flags.StringVar(&ManifestFlag, "manifest", "", "Name of the project manifest.") 35 }