Skip to content

Commit 609f8d3

Browse files
committed
renaming disk add command to disk import command
Signed-off-by: Songpon Srisawai <songpon.ssw@gmail.com>
1 parent 250f4f7 commit 609f8d3

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

cmd/limactl/disk.go

+11-12
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func newDiskCommand() *cobra.Command {
4747
newDiskDeleteCommand(),
4848
newDiskUnlockCommand(),
4949
newDiskResizeCommand(),
50-
newDiskAddCommand(),
50+
newDiskImportCommand(),
5151
)
5252
return diskCommand
5353
}
@@ -423,22 +423,21 @@ func diskBashComplete(cmd *cobra.Command, _ []string, _ string) ([]string, cobra
423423
return bashCompleteDiskNames(cmd)
424424
}
425425

426-
func newDiskAddCommand() *cobra.Command {
427-
diskAddCommand := &cobra.Command{
428-
Use: "add DISK FILE",
426+
func newDiskImportCommand() *cobra.Command {
427+
diskImportCommand := &cobra.Command{
428+
Use: "import DISK FILE",
429429
Example: `
430-
Add a disk:
431-
$ limactl disk add DISK DISKPATH
430+
Import a disk:
431+
$ limactl disk import DISK DISKPATH
432432
`,
433-
Short: "Add an existing disk to Lima",
434-
Aliases: []string{"import"},
433+
Short: "Import an existing disk to Lima",
435434
Args: WrapArgsError(cobra.ExactArgs(2)),
436-
RunE: diskAddAction,
435+
RunE: diskImportAction,
437436
}
438-
return diskAddCommand
437+
return diskImportCommand
439438
}
440439

441-
func diskAddAction(_ *cobra.Command, args []string) error {
440+
func diskImportAction(_ *cobra.Command, args []string) error {
442441
diskName := args[0]
443442
fName := args[1]
444443

@@ -479,7 +478,7 @@ func diskAddAction(_ *cobra.Command, args []string) error {
479478
return nil
480479
}
481480

482-
logrus.Infof("Added %s with size %s", diskName, units.BytesSize(float64(diskSize)))
481+
logrus.Infof("Imported %s with size %s", diskName, units.BytesSize(float64(diskSize)))
483482

484483
return nil
485484
}

0 commit comments

Comments
 (0)