1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| method: GET
2019/10/22 15:19:22 http: panic serving 127.0.0.1:64117: runtime error: invalid memory address or nil pointer dereference
goroutine 6 [running]:
net/http.(*conn).serve.func1(0xc0000650e0)
D:/golang/src/net/http/server.go:1767 +0x140
panic(0x780880, 0xabfe80)
D:/golang/src/runtime/panic.go:679 +0x1c0
html/template.(*Template).escape(0x0, 0x0, 0x0)
D:/golang/src/html/template/template.go:95 +0x49
html/template.(*Template).Execute(0x0, 0x869920, 0xc000102000, 0x0, 0x0, 0x869a60, 0xc0000ca150)
D:/golang/src/html/template/template.go:119 +0x36
main.login(0x86f5e0, 0xc000102000, 0xc0000ee000)
E:/go_code/src/demo1/main/main.go:28 +0x34d
net/http.HandlerFunc.ServeHTTP(0x807338, 0x86f5e0, 0xc000102000, 0xc0000ee000)
D:/golang/src/net/http/server.go:2007 +0x4b
net/http.(*ServeMux).ServeHTTP(0xacfa00, 0x86f5e0, 0xc000102000, 0xc0000ee000)
D:/golang/src/net/http/server.go:2387 +0x1c4
net/http.serverHandler.ServeHTTP(0xc0000c4000, 0x86f5e0, 0xc000102000, 0xc0000ee000)
D:/golang/src/net/http/server.go:2802 +0xab
net/http.(*conn).serve(0xc0000650e0, 0x86fba0, 0xc0000cc000)
D:/golang/src/net/http/server.go:1890 +0x87c
created by net/http.(*Server).Serve
D:/golang/src/net/http/server.go:2927 +0x395 |