I updated my codebase to Go 1.18. It all looks great, but in a few places, I found the following issues.
defer func() {
if e := recover() ; e!=nil {
...
}
}()
Compilation is failing with:
Cannot convert 'nil' to type 'any'
The same code was working good with Go 1.17. Based on Go 1.18 Release notes, any
is a built-in type of alias for interface{}
(Generics)
What is going on?
gopls
update perhaps? – Diskson