Add some go testing infrastructure

This commit is contained in:
Kovid Goyal
2022-08-16 09:22:12 +05:30
parent 3a21605b05
commit 1325844539
5 changed files with 102 additions and 10 deletions

View File

@@ -22,6 +22,16 @@ func EntryPoint(tool_root *cobra.Command) *cobra.Command {
" for permission to perform the specified action, unless the password has been"+
" accepted before or is pre-configured in :file:`kitty.conf`.")
root.PersistentFlags().String("password-file", "rc-pass",
"A file from which to read the password. Trailing whitespace is ignored. Relative"+
" paths are resolved from the kitty configuration directory. Use - to read from STDIN."+
" Used if no :option:`--password` is supplied. Defaults to checking for the"+
" :file:`rc-pass` file in the kitty configuration directory.")
root.PersistentFlags().String("password-env", "KITTY_RC_PASSWORD",
"The name of an environment variable to read the password from."+
" Used if no :option:`--password-file` or :option:`--password` is supplied.")
cli.PersistentChoices(root, "use-password", "If no password is available, kitty will usually just send the remote control command without a password. This option can be used to force it to always or never use the supplied password.", "if-available", "always", "never")
return root
}