|
26 | 26 | forceVar bool |
27 | 27 | verboseVar bool |
28 | 28 | drives map[string]bool |
29 | | - partitionLayoutVar string |
| 29 | + partitionLayoutVar string |
30 | 30 | driveKeys []string |
31 | 31 | ) |
32 | 32 |
|
@@ -138,7 +138,7 @@ func format(d, label, fsType string, partType string, partitionLayoutVar string, |
138 | 138 | log.Printf("Clearing partitions on %s because forced format was requested", d) |
139 | 139 | } |
140 | 140 | partCmd := exec.Command("sfdisk", "--quiet", "--delete", d) |
141 | | - partCmd.Stdin = strings.NewReader(partitionLayoutVar) |
| 141 | + partCmd.Stdin = strings.NewReader(partitionLayoutVar) |
142 | 142 | if out, err := partCmd.CombinedOutput(); err != nil { |
143 | 143 | return fmt.Errorf("Error deleting partitions with sfdisk: %v\n%s", err, out) |
144 | 144 | } |
@@ -170,7 +170,7 @@ func format(d, label, fsType string, partType string, partitionLayoutVar string, |
170 | 170 |
|
171 | 171 | // format one large partition |
172 | 172 | partCmd := exec.Command("sfdisk", "--quiet", d) |
173 | | - partCmd.Stdin = strings.NewReader(partitionLayoutVar) |
| 173 | + partCmd.Stdin = strings.NewReader(partitionLayoutVar) |
174 | 174 | if out, err := partCmd.CombinedOutput(); err != nil { |
175 | 175 | return fmt.Errorf("Error running sfdisk: %v\n%s", err, out) |
176 | 176 | } |
@@ -268,7 +268,7 @@ func init() { |
268 | 268 | flag.StringVar(&labelVar, "label", "", "Disk label to apply") |
269 | 269 | flag.StringVar(&fsTypeVar, "type", "ext4", "Type of filesystem to create") |
270 | 270 | flag.StringVar(&partTypeVar, "partition", "dos", "Type of partition table to create") |
271 | | - flag.StringVar(&partitionLayoutVar, "layout", ";", "Partition layout for sfdisk invocation") |
| 271 | + flag.StringVar(&partitionLayoutVar, "layout", ";", "Partition layout for sfdisk invocation") |
272 | 272 | flag.BoolVar(&verboseVar, "verbose", false, "Enable verbose output (default false)") |
273 | 273 | } |
274 | 274 |
|
|
0 commit comments