package main func test(xPtr *int) { *xPtr = 0 } func main(){ test(nil) }
Standard input is empty
Standard output is empty
panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x8048c19] goroutine 1 [running]: main.main() /home/c8yn5l/prog.go:8 +0x19 goroutine 2 [syscall]: created by runtime.main /usr/local/go/src/pkg/runtime/proc.c:221