open-vault/command/print.go
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

49 lines
891 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package command
import (
"strings"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
var (
_ cli.Command = (*PrintCommand)(nil)
_ 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
}