Skip to content

Commit

Permalink
lxc/restore: 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 13, 2025
1 parent 94c21d6 commit 7ecbf8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lxc/restore.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package main

import (
"fmt"

"github.com/spf13/cobra"

"github.com/canonical/lxd/shared"
Expand Down Expand Up @@ -61,7 +59,7 @@ func (c *cmdRestore) run(cmd *cobra.Command, args []string) error {
// Setup the snapshot restore
snapname := args[1]
if !shared.IsSnapshot(snapname) {
snapname = fmt.Sprintf("%s/%s", name, snapname)
snapname = name + "/" + snapname
}

req := api.InstancePut{
Expand Down

0 comments on commit 7ecbf8f

Please sign in to comment.