2018/06/27 21:21:12 http: panic serving 10.105.107.106:41488: runtime error: invalid memory address or nil pointer dereference
goroutine 1238 [running]:
net/http.(*conn).serve.func1(0xc420195a40)
/usr/local/go/src/net/http/server.go:1726 +0xd0
panic(0x701840, 0x91fd70)
/usr/local/go/src/runtime/panic.go:502 +0x229
database/sql.(*Stmt).ExecContext(0x0, 0x7a82a0, 0xc4200160d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/database/sql/sql.go:2224 +0x4a
database/sql.(*Stmt).Exec(0x0, 0x0, 0x0, 0x0, 0x7efe6b4862a8, 0xc4201ce600, 0x0, 0xc42017e555)
/usr/local/go/src/database/sql/sql.go:2253 +0x65
main.mpp(0x7a7fe0, 0xc4203421c0, 0xc420332500)
/root/golang_mysql_proxy_pool/pool.go:151 +0x12e1
net/http.HandlerFunc.ServeHTTP(0x77e138, 0x7a7fe0, 0xc4203421c0, 0xc420332500)
/usr/local/go/src/net/http/server.go:1947 +0x44
net/http.(*ServeMux).ServeHTTP(0x92c0a0, 0x7a7fe0, 0xc4203421c0, 0xc420332500)
/usr/local/go/src/net/http/server.go:2337 +0x130
net/http.serverHandler.ServeHTTP(0xc420097110, 0x7a7fe0, 0xc4203421c0, 0xc420332500)
/usr/local/go/src/net/http/server.go:2694 +0xbc
net/http.(*conn).serve(0xc420195a40, 0x7a8260, 0xc4201d0800)
/usr/local/go/src/net/http/server.go:1830 +0x651
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2795 +0x27b
有疑问加站长微信联系(非本文作者)