Sfoglia il codice sorgente

correcting PR comments

Hana Kim 8 anni fa
parent
commit
53ab91412e
1 ha cambiato i file con 3 aggiunte e 5 eliminazioni
  1. 3
    5
      internal/report/report.go

+ 3
- 5
internal/report/report.go Vedi File

@@ -624,9 +624,9 @@ func printTags(w io.Writer, rpt *Report) error {
624 624
 				valueMap, ok := tagMap[key]
625 625
 				if !ok {
626 626
 					valueMap = make(map[string]int64)
627
+					tagMap[key] = valueMap
627 628
 				}
628 629
 				valueMap[val] += o.SampleValue(s.Value)
629
-				tagMap[key] = valueMap
630 630
 			}
631 631
 		}
632 632
 		for key, vals := range s.NumLabel {
@@ -635,9 +635,9 @@ func printTags(w io.Writer, rpt *Report) error {
635 635
 				valueMap, ok := tagMap[key]
636 636
 				if !ok {
637 637
 					valueMap = make(map[string]int64)
638
+					tagMap[key] = valueMap
638 639
 				}
639 640
 				valueMap[val] += o.SampleValue(s.Value)
640
-				tagMap[key] = valueMap
641 641
 			}
642 642
 		}
643 643
 	}
@@ -668,9 +668,7 @@ func printTags(w io.Writer, rpt *Report) error {
668 668
 		}
669 669
 		fmt.Fprintln(tabw)
670 670
 	}
671
-	tabw.Flush()
672
-	return nil
673
-
671
+	return tabw.Flush()
674 672
 }
675 673
 
676 674
 // printComments prints all freeform comments in the profile.