1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-15 01:04:40 +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
var jsonInst JSONInstruction
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{