Skip to content

Commit a39b72c

Browse files
committed
fix: lint
1 parent 0e5a5f8 commit a39b72c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pkg/actions/deploy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ func (d *Deploy) planAndApplyDeploy(ctx context.Context, verify bool, state *sta
736736
if err == nil {
737737
prog, cb := applyProgress(d.log, deployChanges)
738738
err = d.applyDeploy(context.Background(), state, planDeployMap, destroy, cb)
739+
739740
prog.Stop()
740741
}
741742

@@ -744,6 +745,7 @@ func (d *Deploy) planAndApplyDeploy(ctx context.Context, verify bool, state *sta
744745
if err == nil {
745746
prog, cb := applyProgress(d.log, dnsChanges)
746747
err = d.applyDNS(context.Background(), state, planDNSMap, destroy, cb)
748+
747749
prog.Stop()
748750
}
749751

pkg/actions/util.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)