This commit is contained in:
admju
2024-09-10 17:01:54 +00:00
parent 75b7b94a50
commit 4bce096e1f
18 changed files with 315 additions and 75 deletions

View File

@@ -10,15 +10,15 @@ import (
"oc-deploy/kubectl"
)
type KubecltInstallData struct {
type KubectlInstall struct {
obj ToolData
}
func (this KubecltInstallData) Get() (ToolData) {
func (this KubectlInstall) Get() (ToolData) {
return this.obj
}
func (this KubecltInstallData) Download() (error) {
func (this KubectlInstall) Download() (error) {
bin_dir := this.obj.Bin
bin := filepath.Join(bin_dir, this.obj.Name)
@@ -36,7 +36,7 @@ func (this KubecltInstallData) Download() (error) {
}
///////////////
func (this KubecltInstallData) Version(path string) (string, error) {
func (this KubectlInstall) Version(path string) (string, error) {
cmd := kubectl.KubectlCommand{Bin: path}
cmd.New()
return cmd.GetVersion()