Skip to content

Commit 9952804

Browse files
committed
Fix pointer issue
1 parent 9c5b07c commit 9952804

File tree

1 file changed

+3
-2
lines changed
  • tools/flakeguard/reports

1 file changed

+3
-2
lines changed

tools/flakeguard/reports/io.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)