|
|
|
|
|
by adamrt
376 days ago
|
|
Any time I write "if err == nil" I write // inverted just to make it stick out. It would be nice if it was handled by the language but just wanted to share a way to at least make it a bit more visible. if err == nil { // inverted
return err
}
|
|
It’s usually pretty obvious why: eg
But it at least saves me having to double check the logic of the code each time I reread the code for the first time in a while.