From 5953627623e8736213e7366adb4d08af788f4e83 Mon Sep 17 00:00:00 2001 From: Laurence Withers Date: Sat, 29 Apr 2023 11:48:10 +0100 Subject: [PATCH] cmd/inspect: add help --- cmd/inspect/inspect.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cmd/inspect/inspect.go b/cmd/inspect/inspect.go index 415a20f..c52badf 100644 --- a/cmd/inspect/inspect.go +++ b/cmd/inspect/inspect.go @@ -26,10 +26,20 @@ var ( // Register the "inspect" subcommand. func Register(root *cobra.Command) { cmd := &cobra.Command{ - Use: "inspect", + Use: "inspect source [source2 …]", Short: "Inspect files and TLS servers", - RunE: Inspect, - Args: cobra.MinimumNArgs(1), + Long: `Allows inspection of RSA keys, X.509 certificates, CRLs and CSRs. Pass +it a list of sources. Valid sources are: + • filenames + • ‘-’ for stdin + • host:port for extracting the server's certificate chain from a TLS handshake + • https://addr.example/ as per host:port + +The output will by default be human-readable formatted text for the terminal, +but JSON and YAML are also supported through the --output flag.`, + + RunE: Inspect, + Args: cobra.MinimumNArgs(1), } if isatty.IsTerminal(1) {