@@ -2350,11 +2350,11 @@ func analyzeMetafileImpl(metafile string, opts AnalyzeMetafileOptions) string {
2350
2350
third := "100.0%"
2351
2351
2352
2352
table = append (table , tableEntry {
2353
- first : fmt . Sprintf ( "%s%s%s" , colors . Bold , entry .name , colors . Reset ) ,
2353
+ first : entry .name ,
2354
2354
firstLen : utf8 .RuneCountInString (entry .name ),
2355
- second : fmt . Sprintf ( "%s%s%s" , colors . Bold , second , colors . Reset ) ,
2355
+ second : second ,
2356
2356
secondLen : len (second ),
2357
- third : fmt . Sprintf ( "%s%s%s" , colors . Bold , third , colors . Reset ) ,
2357
+ third : third ,
2358
2358
thirdLen : len (third ),
2359
2359
isTopLevel : true ,
2360
2360
})
@@ -2431,8 +2431,10 @@ func analyzeMetafileImpl(metafile string, opts AnalyzeMetafileOptions) string {
2431
2431
// Render the columns now that we know the widths
2432
2432
for _ , entry := range table {
2433
2433
prefix := "\n "
2434
+ color := colors .Bold
2434
2435
if ! entry .isTopLevel {
2435
2436
prefix = ""
2437
+ color = ""
2436
2438
}
2437
2439
2438
2440
// Import paths don't have second and third columns
@@ -2454,17 +2456,23 @@ func analyzeMetafileImpl(metafile string, opts AnalyzeMetafileOptions) string {
2454
2456
extraSpace = 1
2455
2457
}
2456
2458
2457
- sb .WriteString (fmt .Sprintf ("%s %s %s%s%s %s %s%s%s %s\n " ,
2459
+ sb .WriteString (fmt .Sprintf ("%s %s%s%s %s%s%s %s%s%s %s%s%s %s%s %s\n " ,
2458
2460
prefix ,
2461
+ color ,
2459
2462
entry .first ,
2463
+ colors .Reset ,
2460
2464
colors .Dim ,
2461
2465
strings .Repeat (lineChar , extraSpace + maxFirstLen - entry .firstLen + maxSecondLen - entry .secondLen ),
2462
2466
colors .Reset ,
2467
+ color ,
2463
2468
secondTrimmed ,
2469
+ colors .Reset ,
2464
2470
colors .Dim ,
2465
2471
strings .Repeat (lineChar , extraSpace + maxThirdLen - entry .thirdLen + len (second )- len (secondTrimmed )),
2466
2472
colors .Reset ,
2473
+ color ,
2467
2474
entry .third ,
2475
+ colors .Reset ,
2468
2476
))
2469
2477
}
2470
2478
0 commit comments