Skip to content

Commit

Permalink
lxc/*: Replace hardcoded source types with constants
Browse files Browse the repository at this point in the history
Signed-off-by: Din Music <[email protected]>
  • Loading branch information
MusicDin committed Dec 5, 2024
1 parent 310d18e commit 5e6654b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lxc/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ func (c *cmdInit) create(conf *config.Config, args []string, launch bool) (lxd.I

opInfo = *info
} else {
req.Source.Type = "none"
req.Source.Type = api.SourceTypeNone

op, err := d.CreateInstance(req)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion lxc/rebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (c *cmdRebuild) rebuild(conf *config.Config, args []string) error {
return errors.New(i18n.G("Can't use an image with --empty"))
}

req.Source.Type = "none"
req.Source.Type = api.SourceTypeNone
op, err := d.RebuildInstance(name, req)
if err != nil {
return err
Expand Down

0 comments on commit 5e6654b

Please sign in to comment.