forked from hashicorp/vault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
print.go
43 lines (32 loc) · 807 Bytes
/
print.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package command
import (
"strings"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
var _ cli.Command = (*PrintCommand)(nil)
var _ cli.CommandAutocomplete = (*PrintCommand)(nil)
type PrintCommand struct {
*BaseCommand
}
func (c *PrintCommand) Synopsis() string {
return "Prints runtime configurations"
}
func (c *PrintCommand) Help() string {
helpText := `
Usage: vault print <subcommand>
This command groups subcommands for interacting with Vault's runtime values.
Subcommands:
token Token currently in use
`
return strings.TrimSpace(helpText)
}
func (c *PrintCommand) AutocompleteArgs() complete.Predictor {
return nil
}
func (c *PrintCommand) AutocompleteFlags() complete.Flags {
return nil
}
func (c *PrintCommand) Run(args []string) int {
return cli.RunResultHelp
}