From 56807553fcc27562919d8890212f69f1341f50ca Mon Sep 17 00:00:00 2001 From: Marin Salinas Date: Tue, 13 Oct 2020 10:45:32 -0500 Subject: [PATCH] chore: fix lint issues on osc builder --- builder/osc/common/state.go | 4 ++-- builder/osc/common/step_get_password.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/osc/common/state.go b/builder/osc/common/state.go index a5d41e03c..fc6060743 100644 --- a/builder/osc/common/state.go +++ b/builder/osc/common/state.go @@ -67,7 +67,7 @@ func WaitUntilOscSnapshotDone(conn *osc.APIClient, snapshotID string) error { return <-errCh } -func waitForState(errCh chan<- error, target string, refresh stateRefreshFunc) error { +func waitForState(errCh chan<- error, target string, refresh stateRefreshFunc) { err := common.Retry(2, 2, 0, func(_ uint) (bool, error) { state, err := refresh() if err != nil { @@ -78,7 +78,7 @@ func waitForState(errCh chan<- error, target string, refresh stateRefreshFunc) e return false, nil }) errCh <- err - return err + return } func waitUntilOscVmStateFunc(conn *osc.APIClient, id string) stateRefreshFunc { diff --git a/builder/osc/common/step_get_password.go b/builder/osc/common/step_get_password.go index d05cd4ca3..df1e42740 100644 --- a/builder/osc/common/step_get_password.go +++ b/builder/osc/common/step_get_password.go @@ -127,7 +127,7 @@ func (s *StepGetPassword) waitForPassword(state multistep.StateBag, cancel <-cha if resp.AdminPassword != "" { decryptedPassword, err := decryptPasswordDataWithPrivateKey( - resp.AdminPassword, []byte(privateKey)) + resp.AdminPassword, privateKey) if err != nil { err := fmt.Errorf("Error decrypting auto-generated vm password: %s", err) return "", err