log.Printf("%s are %d years old", strings.Join(names, ", "), age)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4aec31]
goroutine 1 [running]:
database/sql.(*DB).conn(0x0, 0x0, 0x0, 0x203001, 0xc00006ae38, 0x203000, 0x203000)
/usr/local/go-faketime/src/database/sql/sql.go:1134 +0x41
database/sql.(*DB).query(0x0, 0x0, 0x0, 0x4f2cf0, 0x22, 0xc00006af38, 0x1, 0x1, 0xc000010201, 0x5aeb00, ...)
/usr/local/go-faketime/src/database/sql/sql.go:1552 +0x66
database/sql.(*DB).QueryContext(0x0, 0x0, 0x0, 0x4f2cf0, 0x22, 0xc00006af38, 0x1, 0x1, 0xc00006af18, 0x4b474a, ...)
/usr/local/go-faketime/src/database/sql/sql.go:1534 +0xd1
main.main()
/tmp/sandbox184082418/prog.go:17 +0xcf
Program exited.
What did you do?
Ran the example under the
sql.Rowstype at https://golang.org/pkg/database/sql/#Rows.Scan.What did you expect to see?
Logged output from the call:
What did you see instead?
A panic: