@@ -47,29 +47,29 @@ func TestPartitionSize(t *testing.T) {
47
47
48
48
func TestDiskString (t * testing.T ) {
49
49
mib := disko .Mebibyte
50
- gb := uint64 (1000 * 1000 * 1000 ) // nolint: gomnd
50
+ gb := uint64 (1000 * 1000 * 1000 )
51
51
52
52
d := disko.Disk {
53
53
Name : "sde" ,
54
54
Path : "/dev/sde" ,
55
55
Size : gb ,
56
- SectorSize : 512 , //nolint: gomnd
56
+ SectorSize : 512 ,
57
57
Type : disko .HDD ,
58
58
Attachment : disko .ATA ,
59
59
Partitions : disko.PartitionSet {
60
- 1 : {Start : 3 * mib , Last : 253 * mib - 1 , Number : 1 }, //nolint: gomnd
61
- 3 : {Start : 500 * mib , Last : 600 * mib - 1 , Number : 3 }, //nolint: gomnd
60
+ 1 : {Start : 3 * mib , Last : 253 * mib - 1 , Number : 1 },
61
+ 3 : {Start : 500 * mib , Last : 600 * mib - 1 , Number : 3 },
62
62
},
63
63
UdevInfo : disko.UdevInfo {},
64
64
}
65
65
found := " " + d .String () + " "
66
66
67
67
// disk size 1gb = 953 MiB. 600 = (253-3) + (953-600)
68
- expectedFree := 600 // nolint: gomnd
68
+ expectedFree := 600
69
69
70
70
for _ , substr := range []string {
71
71
fmt .Sprintf ("Size=%d" , gb ),
72
- fmt .Sprintf ("FreeSpace=%dMiB/2" , expectedFree ), //nolint: gomnd
72
+ fmt .Sprintf ("FreeSpace=%dMiB/2" , expectedFree ),
73
73
fmt .Sprintf ("NumParts=%d" , len (d .Partitions ))} {
74
74
if ! strings .Contains (found , " " + substr + " " ) {
75
75
t .Errorf ("%s: missing expected substring ' %s '" , found , substr )
@@ -83,11 +83,11 @@ func TestDiskDetails(t *testing.T) {
83
83
Name : "sde" ,
84
84
Path : "/dev/sde" ,
85
85
Size : mib * mib ,
86
- SectorSize : 512 , //nolint: gomnd
86
+ SectorSize : 512 ,
87
87
Type : disko .HDD ,
88
88
Attachment : disko .ATA ,
89
89
Partitions : disko.PartitionSet {
90
- 1 : {Start : 3 * mib , Last : 253 * mib - 1 , Number : 1 }, //nolint: gomnd
90
+ 1 : {Start : 3 * mib , Last : 253 * mib - 1 , Number : 1 },
91
91
},
92
92
UdevInfo : disko.UdevInfo {},
93
93
}
@@ -152,7 +152,7 @@ func TestPartitionSerializeJson(t *testing.T) {
152
152
myIDStr := "01234567-89AB-CDEF-0123-456789ABCDEF"
153
153
myID , _ := disko .StringToGUID (myIDStr )
154
154
p := disko.Partition {
155
- Start : 3 * disko .Mebibyte , //nolint:gomnd
155
+ Start : 3 * disko .Mebibyte ,
156
156
Last : 253 * disko .Mebibyte - 1 ,
157
157
ID : myID ,
158
158
Type : partid .EFI ,
@@ -198,8 +198,8 @@ func TestPartitionUnserializeJson(t *testing.T) {
198
198
}
199
199
200
200
expected := disko.Partition {
201
- Start : 3 * disko .Mebibyte , // nolint:gomnd
202
- Last : 253 * disko .Mebibyte - 1 , // nolint:gomnd
201
+ Start : 3 * disko .Mebibyte ,
202
+ Last : 253 * disko .Mebibyte - 1 ,
203
203
ID : myID ,
204
204
Type : partid .EFI ,
205
205
Name : "my system part" ,
@@ -217,8 +217,8 @@ func TestDiskSerializeJson(t *testing.T) {
217
217
d := disko.Disk {
218
218
Name : "sda" ,
219
219
Path : "/dev/sda" ,
220
- Size : 500 * disko .Mebibyte , //nolint:gomnd
221
- SectorSize : 512 , //nolint:gomnd
220
+ Size : 500 * disko .Mebibyte ,
221
+ SectorSize : 512 ,
222
222
Type : disko .HDD ,
223
223
Attachment : disko .ATA ,
224
224
}
@@ -247,8 +247,8 @@ func TestDiskUnserializeJson(t *testing.T) {
247
247
expected := disko.Disk {
248
248
Name : "sda" ,
249
249
Path : "/dev/sda" ,
250
- Size : 500 * disko .Mebibyte , //nolint:gomnd
251
- SectorSize : 512 , //nolint:gomnd
250
+ Size : 500 * disko .Mebibyte ,
251
+ SectorSize : 512 ,
252
252
Type : disko .HDD ,
253
253
Attachment : disko .ATA ,
254
254
}
0 commit comments