Skip to content
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

Getting error : panic: template: redefinition of template "default.html" #1

Open
zxcfer opened this issue Aug 14, 2016 · 1 comment

Comments

@zxcfer
Copy link

zxcfer commented Aug 14, 2016

I am getting this error

Connected to mongodb://localhost:27017/articles_demo_dev
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

panic: template: redefinition of template "default.html"

goroutine 1 [running]:
html/template.Must(0x0, 0x360028, 0xc0821aabb0, 0x0)
        c:/go/src/html/template/template.go:330 +0x52
github.com/madhums/go-gin-mgo-demo/gin_html_render.(*Render).AddFromFiles(0xc08200d5e0, 0xc082155420, 0x19, 0xc082155440, 0x2, 0x2, 0xc0821c67e0)
        E:/Go/src/github.com/madhums/go-gin-mgo-demo/gin_html_render/gin_html_render.go:81 +0x75
github.com/madhums/go-gin-mgo-demo/gin_html_render.(*Render).Create(0xc08200d5e0, 0xc08200d5e0)
        E:/Go/src/github.com/madhums/go-gin-mgo-demo/gin_html_render/gin_html_render.go:154 +0x63b
main.main()
        E:/Go/src/ginmon-news/main.go:38 +0x19b
@lsianturi
Copy link

Try running the run command from it's source folder like this:
/src/github.com/madhums/go-gin-mgo-demo$ go get && go install && PORT=7000 DEBUG=* gin -p 9000 -a 7000 -i run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants