(cmd *Command)
| 55 | ) |
| 56 | |
| 57 | func addCommonFlags(cmd *Command) { |
| 58 | cmd.CommonFlag.BoolVar(&help, "help", false, "Show help message") |
| 59 | cmd.CommonFlag.BoolVar(&withPassword, "with-password", false, |
| 60 | "Enter the passphrase for private.key") |
| 61 | |
| 62 | // debugging flags. |
| 63 | cmd.DebugFlag.StringVar(&password, "password", "", |
| 64 | "Passphrase for encrypting private.key (NOT SAFE, for debug or script only)") |
| 65 | cmd.DebugFlag.StringVar(&consoleLogLevel, "log-level", "info", |
| 66 | "Console log level: trace debug info warning error fatal panic") |
| 67 | cmd.DebugFlag.BoolVar(&asymmetric.BypassSignature, "bypass-signature", false, |
| 68 | "Disable signature sign and verify, for testing") |
| 69 | } |
| 70 | |
| 71 | func commonFlagsInit(cmd *Command) { |
| 72 | if help { |
no outgoing calls
no test coverage detected