1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-21 17:16: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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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{