There's a section of my code that has unexpected behaviour.
. . .
fmt.Println("Error:", err)
if err == nil {
return err
}
fmt.Println("Done category")
. . .
The section above has the following output
Error: <nil>
The code below if statement is never executed. If I remove the if statement the code behaves as expected.
Reference: https://github.com/skarllot/flogviewer/blob/master/wlog/parser.go#L138