@@ -345,11 +345,11 @@ func applyActionType(act *apiv1.ApplyAction) string {
345345 return "unknown"
346346}
347347
348- func applyProgress (log logger.Logger , changes []* change ) (logger.Progressbar , func (* apiv1.ApplyAction )) {
348+ func applyProgress (log logger.Logger , changes []* change ) (progressbar logger.Progressbar , callback func (* apiv1.ApplyAction )) {
349349 total := calculateTotalSteps (changes )
350350
351351 // Create progressbar as fork from the default progressbar.
352- p , _ : = log .ProgressBar ().WithTotal (total ).WithTitle ("Applying..." ).Start ()
352+ progressbar , _ = log .ProgressBar ().WithTotal (total ).WithTitle ("Applying..." ).Start ()
353353
354354 startMap := make (map [applyTargetKey ]* applyTarget )
355355
@@ -379,7 +379,7 @@ func applyProgress(log logger.Logger, changes []*change) (logger.Progressbar, fu
379379
380380 timeInfo := pterm .NewStyle (pterm .FgWhite , pterm .Reset )
381381
382- return p , func (act * apiv1.ApplyAction ) {
382+ return progressbar , func (act * apiv1.ApplyAction ) {
383383 key := applyTargetKey {ns : act .Namespace , typ : act .ObjectType , obj : act .ObjectId }
384384
385385 if act .Progress == 0 {
@@ -409,7 +409,7 @@ func applyProgress(log logger.Logger, changes []*change) (logger.Progressbar, fu
409409 log .Successln (success )
410410
411411 if act .Progress == act .Total || act .Type == apiv1 .PlanType_PLAN_TYPE_RECREATE {
412- p .Increment ()
412+ progressbar .Increment ()
413413 }
414414 }
415415}
0 commit comments