partition

package
v0.3.7-alpha6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPartition

func AddPartition(rootDevice string) error

rootDevice - root device, e.g. /dev/sda

func CreatePartitionTable

func CreatePartitionTable(rootDevice string) error

func DeletePartition

func DeletePartition(rootDevice string, number int) error

rootDevice - root device, e.g. /dev/sda

number - partition number, e.g. 1

func FormatPartition

func FormatPartition(partitionDevice string) error

partitionDevice - partition device, e.g. /dev/sda1

func GetDevicePath

func GetDevicePath(uuid string) (string, error)

Types

type Partition

type Partition struct {
	LSBLKProperties map[string]string
	PARTXProperties map[string]string
}

func GetPartitions

func GetPartitions(rootDevice string) ([]Partition, error)

rootDevice - root device, e.g. /dev/sda

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL