Skip to content

Commit

Permalink
removing duplicated import.
Browse files Browse the repository at this point in the history
  • Loading branch information
elkezza committed Aug 20, 2024
1 parent 97dceda commit 99439f2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cmd/instance_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
exossh "github.com/exoscale/cli/pkg/ssh"
"github.com/exoscale/cli/pkg/userdata"
"github.com/exoscale/cli/utils"
egoscale3 "github.com/exoscale/egoscale/v3"
v3 "github.com/exoscale/egoscale/v3"
)

Expand Down Expand Up @@ -266,17 +265,17 @@ func (c *instanceCreateCmd) cmdRun(_ *cobra.Command, _ []string) error { //nolin
}

if c.Protection {
var value egoscale3.UUID
var op *egoscale3.Operation
value, err = egoscale3.ParseUUID(instanceID.String())
var value v3.UUID
var op *v3.Operation
value, err = v3.ParseUUID(instanceID.String())
if err != nil {
return
}
op, err = globalstate.EgoscaleV3Client.AddInstanceProtection(ctx, value)
if err != nil {
return
}
_, err = globalstate.EgoscaleV3Client.Wait(ctx, op, egoscale3.OperationStateSuccess)
_, err = globalstate.EgoscaleV3Client.Wait(ctx, op, v3.OperationStateSuccess)

}
})
Expand Down

0 comments on commit 99439f2

Please sign in to comment.