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 ¶
Types ¶
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
Click to show internal directories.
Click to hide internal directories.