woodpecker-helm3/internal/run/help.go

27 lines
366 B
Go
Raw Normal View History

2019-12-05 22:35:25 +00:00
package run
import (
"os"
)
// 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
}
// Run launches the command.
2019-12-09 17:56:02 +00:00
func (h *Help) Run() error {
return h.cmd.Run()
}
// 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
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
}