Skip to content

Commit

Permalink
adjust spinner location
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhil-024 committed Mar 4, 2025
1 parent 92966f0 commit b04b409
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func (e *Service) DeployServiceSet(ctx *context.Context, request *serviceProto.D
log.Info("Deploying Service Set..")
spinnerInstance := spinner.New(spinner.CharSets[constant.SpinnerType], constant.SpinnerDelay)
err = spinnerInstance.Color(constant.SpinnerColor, constant.SpinnerStyle)
spinnerInstance.Start()
if err != nil {
return err
}
Expand All @@ -126,7 +127,7 @@ func (e *Service) DeployServiceSet(ctx *context.Context, request *serviceProto.D
}

if response != nil {
spinnerInstance.Stop()

var buf bytes.Buffer
table := tablewriter.NewWriter(&buf)
table.SetHeader([]string{"Service Name", "Version", "Action", "Status", "Error"})
Expand All @@ -149,6 +150,7 @@ func (e *Service) DeployServiceSet(ctx *context.Context, request *serviceProto.D
table.Render()
message = buf.String()
spinnerInstance.Prefix = fmt.Sprintf(" %s ", message)
spinnerInstance.Stop()
spinnerInstance.Start()
}
}
Expand Down

0 comments on commit b04b409

Please sign in to comment.