This helper should report whether any input is nil without panicking. Find the unsafe operation.
Go
package main
import "reflect"
func IsNil(input any) bool {
return reflect.ValueOf(input).IsNil()
}
func main() {
println(IsNil(3))
}
package main
import "reflect"
func IsNil(input any) bool {
return reflect.ValueOf(input).IsNil()
}
func main() {
println(IsNil(3))
}