INNER CODE UNIT · Go
getHooks
databus23/helm-diff · cmd/helm.go:164
func getHooks(release string, revision int, namespace, kubeContext string) ([]byte, error) {
cmd := exec.Command(os.Getenv("HELM_BIN"), helmGetArgs("hooks", release, revision, namespace, kubeContext)...)
return outputWithRichError(cmd)
}
func getChart(release, namespace, kubeContext string) (string, error) {
args := []string{helmGetSubcmd, "all", release, "--template", "{{.Release.Chart.Name}}"}
if namespace != "" {
args = append(args, "--namespace", namespace)
}
if kubeContext != "" {
args = append(args, "--kube-context", kubeContext)
}
cmd := exec.Command(os.Getenv("HELM_BIN"), args...)
out, err := outputWithRichError(cmd)
if err != nil {
return "", err
}