Pārlūkot izejas kodu

correcting PR comments

Hana Kim 8 gadus atpakaļ
vecāks
revīzija
53ab91412e
1 mainītis faili ar 3 papildinājumiem un 5 dzēšanām
  1. 3
    5
      internal/report/report.go

+ 3
- 5
internal/report/report.go Parādīt failu

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