// Returns the root partition (the partition whose filesystem has / as
// a mountpoint) of the partition table. Nil is returned if there's no such
// partition.
Returns the root partition (the partition whose filesystem has / as
a mountpoint) of the partition table. Nil is returned if there's no such
partition.
// Returns the root partition ( the partition whose filesystem has / as // a mountpoint ) of the partition table . Nil is returned if there ' s no such // partition .
func (pt PartitionTable) RootPartition() *Partition {
	for _, p := range pt.Partitions {
		if p.Filesystem == nil {
			continue
		}
		if p.Filesystem.Mountpoint == "/" {
			return &p
		}
	}
	return nil
}
func ( pt PartitionTable ) RootPartition ( ) * Partition { for _ , p := range pt . Partitions { if p . Filesystem == nil { continue } if p . Filesystem . Mountpoint == " " { return & p } } return nil }
Returns the root partition (the partition whose filesystem has / as
a mountpoint) of the partition table.
Returns the root partition ( the partition whose filesystem has / as a mountpoint ) of the partition table .