20 lines
341 B
Go
20 lines
341 B
Go
package helm
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
|
|
func (this HelmCommand) GetVersion() (string, error) {
|
|
|
|
cmd := this.Exec(this.Bin, "version", "--short")
|
|
stdout, err := cmd.CombinedOutput()
|
|
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
|
|
res := string(stdout)
|
|
res = strings.TrimSuffix(res, "\n")
|
|
return res, nil
|
|
} |