3 ms·
Go question. Is: if err != nil { // handle err } Required, or can you also do: if err { // handle err }
by nodesocket 11y ago
Go question. Is:
if err != nil {
// handle err
}
Required, or can you also do:
if err {
// handle err
}
- mnbbrown 11y agoThere's no implicit comparison (if that's the CompSci name) in Go. You have to explicitly compare (!= is required)