partition

package
v0.3.7-alpha5 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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