From 956b107528620d47e3e16a3303367ecf5eb36fff Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 16 Jan 2025 13:20:20 -0500 Subject: [PATCH] lxc/action: avoid fmt.Sprintf (slow) Signed-off-by: Simon Deziel --- lxc/action.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc/action.go b/lxc/action.go index 33961ed2c216..113e186eed4f 100644 --- a/lxc/action.go +++ b/lxc/action.go @@ -326,7 +326,7 @@ func (c *cmdAction) run(cmd *cobra.Command, args []string) error { if c.flagAll { // If no server passed, use current default. if len(args) == 0 { - args = []string{fmt.Sprintf("%s:", conf.DefaultRemote)} + args = []string{conf.DefaultRemote + ":"} } // Get all the servers. @@ -368,7 +368,7 @@ func (c *cmdAction) run(cmd *cobra.Command, args []string) error { continue } } - names = append(names, fmt.Sprintf("%s:%s", resource.remote, ct.Name)) + names = append(names, resource.remote+":"+ct.Name) } } } else {