I'm trying to get data out of postgres with golang. I keep getting this pointer error. With reflect I have checked the database has been connected properly. Could anybody offer any advice on how to deal with this error
[signal 0xb code=0x1 addr=0x20 pc=0x4a0041]
goroutine 1 [running]:
database/sql.(*Rows).Close(0x0, 0x0, 0x0)
/home/syuan/.gvm/gos/go1.4/src/database/sql/sql.go:1659 +0x31
database/sql.(*Rows).Next(0x0, 0x1)
/home/syuan/.gvm/gos/go1.4/src/database/sql/sql.go:1586 +0x25
main.getpsql()
/home/syuan/src-git/blue-prometheus/examples/postgres/main.go:40 +0x41e
main.main()
/home/syuan/src-git/blue-prometheus/examples/postgres/main.go:59 +0x1b
goroutine 5 [chan receive]:
database/sql.(*DB).connectionOpener(0xc208036000)
/home/syuan/.gvm/gos/go1.4/src/database/sql/sql.go:589 +0x4c
created by database/sql.Open
/home/syuan/.gvm/gos/go1.4/src/database/sql/sql.go:452 +0x31c
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/home/syuan/.gvm/gos/go1.4/src/runtime/asm_amd64.s:2232 +0x1
exit status 2