Skip to content

Commit

Permalink
lxc/action: avoid fmt.Sprintf (slow)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Jan 20, 2025
1 parent 0d72099 commit 956b107
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lxc/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 956b107

Please sign in to comment.