From 7909f13ec5fc4a7786bf6120bcf7b7588b3e2fb0 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Fri, 14 Feb 2025 11:24:25 -0500 Subject: [PATCH] lxc/import: avoid fmt.Sprintf() Signed-off-by: Simon Deziel --- lxc/import.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc/import.go b/lxc/import.go index bba2e0912865..d1b989363432 100644 --- a/lxc/import.go +++ b/lxc/import.go @@ -1,8 +1,8 @@ package main import ( - "fmt" "os" + "strconv" "strings" "github.com/spf13/cobra" @@ -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)"}) }, }, },