Closed zw963 closed 2 years ago
I use gin in my docker container.
I start my gin server use this: (In fact, it works, i can remote debug use VSCode)
dlv --listen=:2345 --headless=true --log --api-version=2 --continue --accept-multiclient debug .;
But, the issue is, when error happen, i could not see the error log come from gin, e.g.
like this:
panic: read app/views/users: is a directory goroutine 1 [running]: html/template.Must(...) /usr/local/go/src/html/template/template.go:374 github.com/gin-gonic/gin.(*Engine).LoadHTMLGlob(0xc0001ce1a0, {0xbf0811, 0xb}) /go/pkg/mod/github.com/gin-gonic/gin@v1.7.7/gin.go:225 +0x2e6 admin/config/routes.Config() /app/config/routes/routes.go:22 +0x92 main.main() /app/main.go:9 +0x19 exit status 2
Which would show when docker-compse up if run directly use go run . instead.
docker-compse up
go run .
Any Idea? Thank you.
Sorry, make issue wrong place.
I use gin in my docker container.
I start my gin server use this: (In fact, it works, i can remote debug use VSCode)
But, the issue is, when error happen, i could not see the error log come from gin, e.g.
like this:
Which would show when
docker-compse up
if run directly usego run .
instead.Any Idea? Thank you.