Add global flags to all queries and posts

This commit is contained in:
Ethan Frey 2018-01-18 15:40:54 +01:00 committed by Ethan Buchman
parent acf24f1c1b
commit da7a36a866
1 changed files with 13 additions and 2 deletions

View File

@ -16,8 +16,12 @@ const (
flagTags = "tag"
flagAny = "any"
flagBind = "bind"
flagCORS = "cors"
flagBind = "bind"
flagCORS = "cors"
flagTrustNode = "trust-node"
// this is for signing
flagName = "name"
)
var (
@ -42,6 +46,13 @@ Subcommands should be defined for each particular transaction type.`,
}
)
func init() {
getCmd.PersistentFlags().Bool(flagTrustNode, false, "Don't verify proofs for responses")
postCmd.PersistentFlags().String(flagName, "", "Name of private key with which to sign")
postCmd.PersistentFlags().String(flagPassword, "", "Password to use the named private key")
}
// ClientCommands returns a sub-tree of all basic client commands
//
// Call AddGetCommand and AddPostCommand to add custom txs and queries