-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime error: invalid memory address or nil pointer dereference #58
Comments
Lines 63 to 73 in d7a1599
后面的相对路径换成绝对路径,window下测试可以使用 |
|
感谢评论区 |
有效! |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
环境:ubuntu 16.04 go语言:go version go1.13.1 linux/amd64
错误信息:
parse mysql config once. filePath: /home/tonyzhang/data/web/go/top/Config/mysql.toml
2019/10/08 13:03:40 err
2019/10/08 13:03:40 http: panic serving 192.168.99.198:5810: runtime error: invalid memory address or nil pointer dereference
goroutine 21 [running]:
net/http.(*conn).serve.func1(0xc0000bcc80)
/home/tonyzhang/data/go/src/net/http/server.go:1767 +0x139
panic(0x7fe6c0, 0xba3450)
/home/tonyzhang/data/go/src/runtime/panic.go:679 +0x1b2
text/template.errRecover(0xc000165b48)
/home/tonyzhang/data/go/src/text/template/exec.go:164 +0x1cb
panic(0x7fe6c0, 0xba3450)
/home/tonyzhang/data/go/src/runtime/panic.go:679 +0x1b2
text/template.(*Template).execute(0x0, 0x902920, 0xc000152000, 0x0, 0x0, 0x0, 0x0)
/home/tonyzhang/data/go/src/text/template/exec.go:218 +0x1c1
text/template.(*Template).Execute(...)
/home/tonyzhang/data/go/src/text/template/exec.go:204
main.main.func1(0x909960, 0xc000152000, 0xc000144000)
/home/tonyzhang/data/web/go/top/App/Server.go:72 +0xc7
net/http.HandlerFunc.ServeHTTP(0x88ff88, 0x909960, 0xc000152000, 0xc000144000)
/home/tonyzhang/data/go/src/net/http/server.go:2007 +0x44
net/http.(*ServeMux).ServeHTTP(0xbb09c0, 0x909960, 0xc000152000, 0xc000144000)
/home/tonyzhang/data/go/src/net/http/server.go:2387 +0x1bd
net/http.serverHandler.ServeHTTP(0xc000112000, 0x909960, 0xc000152000, 0xc000144000)
/home/tonyzhang/data/go/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc0000bcc80, 0x90a620, 0xc00013a000)
/home/tonyzhang/data/go/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve
/home/tonyzhang/data/go/src/net/http/server.go:2927 +0x38e
The text was updated successfully, but these errors were encountered: