1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

fix: extractInstructionFromJSON returns an error (#1082)

This commit is contained in:
Oleksandr Redko
2024-10-29 14:33:38 +02:00
committed by GitHub
parent 7c29b560c3
commit 511e4e65ff

View File

@@ -210,7 +210,7 @@ func extractInstructionFromJSON(line string, lineNumber int) (instruction, error
// Use the json.Unmarshal function to parse the JSON into the struct // Use the json.Unmarshal function to parse the JSON into the struct
var jsonInst JSONInstruction var jsonInst JSONInstruction
if err := json.Unmarshal([]byte(line), &jsonInst); err != nil { if err := json.Unmarshal([]byte(line), &jsonInst); err != nil {
fmt.Println("Error parsing JSON:", err) return instruction{}, fmt.Errorf("parsing json instruction: %w", err)
} }
ins := instruction{ ins := instruction{