mirror of
https://ghproxy.net/https://github.com/CaptainCore/captaincore.git
synced 2026-07-31 13:37:17 +08:00
25 lines
484 B
Go
25 lines
484 B
Go
package cmd
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var sshVerifyCmd = &cobra.Command{
|
|
Use: "ssh-verify <ssh-connection-string>",
|
|
Short: "Verifies a valid SSH connection",
|
|
Args: func(cmd *cobra.Command, args []string) error {
|
|
if len(args) < 1 {
|
|
return errors.New("requires a <ssh-connection-string> argument")
|
|
}
|
|
return nil
|
|
},
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
resolveCommand(cmd, args)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(sshVerifyCmd)
|
|
}
|