partitioning

package
v0.0.0-...-b79a0d8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package partitioning allows creation of MBR and GPT partition tables and partitions, DESTROYING ANY EXISTING DATA.

Note that it does *not* support:

  • conversion between MBR & GPT,
  • resizing existing partitions,
  • adding partitions to an existing table,
  • specifying gaps,
  • etc.

Index

Constants

View Source
const (
	Unused partType = iota
	FAT32
	NTFS
	Linux
	LinuxRaid
	ESP
)

Variables

This section is empty.

Functions

func List

func List(dev string) string

Types

type Partition

type Partition struct {
	// contains filtered or unexported fields
}

func (Partition) String

func (p Partition) String() string

type Partitioner

type Partitioner interface {
	Commit() error                                               //write changes to disk
	Add(sizeMegs uint64, ptype partType, boot bool, name string) //add a partition
}

func NewGpt

func NewGpt(dev string) Partitioner

func NewMbr

func NewMbr(dev string) Partitioner

func NewPTable

func NewPTable(dev string) Partitioner

determines best type of partition table to use, returns a Partitioner to do so

Jump to

Keyboard shortcuts

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