Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NormalizeVolumeNameCmd = &cobra.Command{ Use: "normalize-volume-name [path]", Short: "get the device name from the path", Long: `Get the device name from the path. The path could be a directory, a partition, or a block device. The block device name will be printed out.`, Run: func(cmd *cobra.Command, args []string) { if len(args) != 1 { cmd.Help() os.Exit(1) } volumePath := args[0] deviceName, err := normalizeVolumeName(volumePath) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } fmt.Println(deviceName) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.