On Thu, Feb 27, 2025 at 9:22 AM David <dav.sec.li...@gmail.com> wrote:
>
> _______________________________
> # go run sigsegv.go
> panic: runtime error: invalid memory address or nil pointer dereference
> [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa68a44]
>
> goroutine 1 [running]:
> cloud.google.com/go/firestore.(*Client).Close(...)
> /root/go/pkg/mod/cloud.google.com/go/firestore@v1.18.0/client.go:138
> main.main()
> /var/www/html/crm/sigsegv.go:25 +0x104
> exit status 2

Are you asking a question? This is what I would expect from your program.

I note that if err2 != nil, you call fmt.Errorf, which just returns an
error value. Perhaps you mean fmt.Printf. I also note that you call
client.Close even if err2 != nil, which is why you get the SIGSEGV.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVM08pvrPV%3D3nYoQLEZawF727nY5-xywVrL%2BSNtZoJAzg%40mail.gmail.com.

Reply via email to