From 4e308ef3625a6f4e155ed547f604e16bf3d875ae Mon Sep 17 00:00:00 2001 From: Paul Thrasher Date: Mon, 30 Sep 2019 13:44:23 -0700 Subject: [PATCH] typos. some code, some text. Signed-off-by: Paul Thrasher --- backend/remote/backend_common.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/backend/remote/backend_common.go b/backend/remote/backend_common.go index 5ebd0f61a..393cb1932 100644 --- a/backend/remote/backend_common.go +++ b/backend/remote/backend_common.go @@ -254,10 +254,10 @@ func (b *Remote) costEstimate(stopCtx, cancelCtx context.Context, op *backend.Op case <-time.After(500 * time.Millisecond): } - // Retrieve the cost estimation to get its current status. + // Retrieve the cost estimate to get its current status. ce, err := b.client.CostEstimates.Read(stopCtx, r.CostEstimate.ID) if err != nil { - return generalError("Failed to retrieve cost estimation", err) + return generalError("Failed to retrieve cost estimate", err) } switch ce.Status { @@ -284,8 +284,7 @@ func (b *Remote) costEstimate(stopCtx, cancelCtx context.Context, op *backend.Op } return nil - case tfe.CostEstimatePending: - case tfe.CostEstimateQueued: + case tfe.CostEstimatePending, tfe.CostEstimateQueued: // Check if 30 seconds have passed since the last update. current := time.Now() if b.CLI != nil && (i == 0 || current.Sub(updated).Seconds() > 30) { @@ -297,7 +296,7 @@ func (b *Remote) costEstimate(stopCtx, cancelCtx context.Context, op *backend.Op elapsed = fmt.Sprintf( " (%s elapsed)", current.Sub(started).Truncate(30*time.Second)) } - b.CLI.Output(b.Colorize().Color("Waiting for cost estimation to complete..." + elapsed + "\n")) + b.CLI.Output(b.Colorize().Color("Waiting for cost estimate to complete..." + elapsed + "\n")) } continue case tfe.CostEstimateErrored: @@ -305,7 +304,7 @@ func (b *Remote) costEstimate(stopCtx, cancelCtx context.Context, op *backend.Op case tfe.CostEstimateCanceled: return fmt.Errorf(msgPrefix + " canceled.") default: - return fmt.Errorf("Unknown or unexpected cost estimation state: %s", ce.Status) + return fmt.Errorf("Unknown or unexpected cost estimate state: %s", ce.Status) } } return nil