go-bongo / bongo

Go ODM for MongoDB
MIT License
486 stars 40 forks source link

Error while creating a collection #38

Closed radha-bacancy closed 6 years ago

radha-bacancy commented 6 years ago

On running the command

err := connection.Collection("people").Save(myPerson)

I'm experiencing this error

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1284525]

goroutine 1 [running]:
main.main()
    /Users/radhakotecha/Desktop/learning/golang/Mongo Connection/Backend/main.go:88 +0x3b5
exit status 2