2019-12-05 22:35:25 +00:00
|
|
|
package run
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
2019-12-09 18:52:41 +00:00
|
|
|
// Help is a step in a helm Plan that calls `helm help`.
|
2019-12-09 17:56:02 +00:00
|
|
|
type Help struct {
|
|
|
|
cmd cmd
|
|
|
|
}
|
|
|
|
|
2019-12-09 18:52:41 +00:00
|
|
|
// Run launches the command.
|
2019-12-09 17:56:02 +00:00
|
|
|
func (h *Help) Run() error {
|
|
|
|
return h.cmd.Run()
|
|
|
|
}
|
|
|
|
|
2019-12-09 18:52:41 +00:00
|
|
|
// NewHelp returns a new Help.
|
2019-12-09 17:56:02 +00:00
|
|
|
func NewHelp() *Help {
|
|
|
|
h := Help{}
|
2019-12-05 22:35:25 +00:00
|
|
|
|
2019-12-09 18:52:41 +00:00
|
|
|
h.cmd = command(helmBin, "help")
|
2019-12-09 17:56:02 +00:00
|
|
|
h.cmd.Stdout(os.Stdout)
|
|
|
|
h.cmd.Stderr(os.Stderr)
|
2019-12-05 22:35:25 +00:00
|
|
|
|
2019-12-09 17:56:02 +00:00
|
|
|
return &h
|
2019-12-05 22:35:25 +00:00
|
|
|
}
|