File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ func processLargeFile(filePath string, reportChan chan<- *TestReport) error {
129129
130130 // Parse fields until we reach the end of the object
131131 for decoder .More () {
132- if err = decodeField (decoder , report ); err != nil {
132+ if err = decodeField (decoder , & report ); err != nil {
133133 return fmt .Errorf ("error decoding field: %w" , err )
134134 }
135135 }
@@ -144,7 +144,7 @@ func processLargeFile(filePath string, reportChan chan<- *TestReport) error {
144144}
145145
146146// decodeField reads a JSON field from the decoder and populates the corresponding field in the TestReport.
147- func decodeField (decoder * json.Decoder , report TestReport ) error {
147+ func decodeField (decoder * json.Decoder , report * TestReport ) error {
148148 token , err := decoder .Token ()
149149 if err != nil {
150150 return fmt .Errorf ("error reading JSON token: %w" , err )
@@ -221,6 +221,7 @@ func decodeField(decoder *json.Decoder, report TestReport) error {
221221 }
222222 log .Warn ().Str ("field" , fieldName ).Msg ("Skipped unknown field, check the test report struct to see if it's been properly updated" )
223223 }
224+ fmt .Printf ("Decoded field: %s\n " , fieldName )
224225 return nil
225226}
226227
You can’t perform that action at this time.
0 commit comments