Skip to content

Commit

Permalink
lxc/import: avoid fmt.Sprintf()
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Feb 14, 2025
1 parent c74a956 commit 7909f13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lxc/import.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"fmt"
"os"
"strconv"
"strings"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -108,7 +108,7 @@ func (c *cmdImport) run(cmd *cobra.Command, args []string) error {
Tracker: &ioprogress.ProgressTracker{
Length: fstat.Size(),
Handler: func(percent int64, speed int64) {
progress.UpdateProgress(ioprogress.ProgressData{Text: fmt.Sprintf("%d%% (%s/s)", percent, units.GetByteSizeString(speed, 2))})
progress.UpdateProgress(ioprogress.ProgressData{Text: strconv.FormatInt(percent, 10) + "% (" + units.GetByteSizeString(speed, 2) + "/s)"})
},
},
},
Expand Down

0 comments on commit 7909f13

Please sign in to comment.