@@ -65,17 +65,17 @@ func ParseStatementFn(l InputLogLeaf) Metadata {
6565 lines := strings .Split (string (l .Data ), "\n " )
6666
6767 if len (lines ) != 3 {
68- panic (fmt .Errorf ("Expected 2 lines in log leaf, but got %d" , len (lines )))
68+ panic (fmt .Errorf ("expected 2 lines in log leaf, but got %d" , len (lines )))
6969 }
7070 line0Parts := line0RE .FindStringSubmatch (lines [0 ])
7171 if got , want := len (line0Parts ), 4 ; got != want {
72- panic (fmt .Errorf ("Regexp : line0 expected %d submatches, but got %d" , want , got ))
72+ panic (fmt .Errorf ("regexp : line0 expected %d submatches, but got %d" , want , got ))
7373 }
7474 line0Module , line0Version , line0Hash := line0Parts [1 ], line0Parts [2 ], line0Parts [3 ]
7575
7676 line1Parts := line1RE .FindStringSubmatch (lines [1 ])
7777 if got , want := len (line1Parts ), 4 ; got != want {
78- panic (fmt .Errorf ("Regexp : line1 expected %d submatches, but got %d (%q)" , want , got , lines [1 ]))
78+ panic (fmt .Errorf ("regexp : line1 expected %d submatches, but got %d (%q)" , want , got , lines [1 ]))
7979 }
8080 line1Module , line1Version , line1Hash := line1Parts [1 ], line1Parts [2 ], line1Parts [3 ]
8181
@@ -113,7 +113,7 @@ type mapEntryFn struct {
113113
114114func (fn * mapEntryFn ) ProcessElement (m Metadata , emit func (* batchmap.Entry )) {
115115 h := hash .New ()
116- h .Write ([] byte ( fmt .Sprintf ( "%s %s/go.mod" , m .Module , m .Version ) ))
116+ h .Write (fmt .Appendf ( nil , "%s %s/go.mod" , m .Module , m .Version ))
117117 modKey := h .Sum (nil )
118118 modLeafID := node .NewID (string (modKey ), uint (len (modKey )* 8 ))
119119
@@ -123,7 +123,7 @@ func (fn *mapEntryFn) ProcessElement(m Metadata, emit func(*batchmap.Entry)) {
123123 })
124124
125125 h = hash .New ()
126- h .Write ([] byte ( fmt .Sprintf ( "%s %s" , m .Module , m .Version ) ))
126+ h .Write (fmt .Appendf ( nil , "%s %s" , m .Module , m .Version ))
127127 repoKey := h .Sum (nil )
128128 repoLeafID := node .NewID (string (repoKey ), uint (len (repoKey )* 8 ))
129129
0 commit comments