From 4086bf8dbc7f1b0346397822c6be0cce367e9e62 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 21 Feb 2022 12:27:15 +0100 Subject: [PATCH] disk: add more docs for fields Complete the docs for fields of `PartitionTable` and `Partition`. --- internal/disk/disk.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/internal/disk/disk.go b/internal/disk/disk.go index 7c6388745..af145b04b 100644 --- a/internal/disk/disk.go +++ b/internal/disk/disk.go @@ -15,19 +15,17 @@ import ( ) type PartitionTable struct { - // Size of the disk. - Size uint64 - UUID string - // Partition table type, e.g. dos, gpt. - Type string + Size uint64 // Size of the disk (in bytes). + UUID string // Unique identifier of the partition table (GPT only). + Type string // Partition table type, e.g. dos, gpt. Partitions []Partition } type Partition struct { - Start uint64 - Size uint64 - Type string - Bootable bool + Start uint64 // Start of the partition in sectors + Size uint64 // Size of the partition in sectors + Type string // Partition type, e.g. 0x83 for MBR or a UUID for gpt + Bootable bool // `Legacy BIOS bootable` (GPT) or `active` (DOS) flag // ID of the partition, dos doesn't use traditional UUIDs, therefore this // is just a string. UUID string