Closed ZIJ closed 4 months ago
For anyone else googling this, this is the error I received:
func1 (5 handlers)
panic: html/template: pattern matches no files: `templates/*.tmpl`
goroutine 1 [running]:
html/template.Must(...)
/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/src/html/template/template.go:368
github.com/gin-gonic/gin.(*Engine).LoadHTMLGlob(0xc00104e4e0, {0x2000f09, 0x10})
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:255 +0x2f7
main.main()
/home/runner/work/digger/digger/backend/main.go:73 +0x549
The fix for now is to put the templates dir into the current working directory where digger api command is run.
Proposed solution: use go embed
Reported by user T. G.