I have a Go app that embeds all HTML templates. Using authboss I need to provide login page template like this:
ab.Config.Core.ViewRenderer = abrenderer.NewHTML("/auth", "/views")
Then I store the login template login.tpl inside /views/html-templates/login.tpl to override the built-in template. The login page shows the correct template if I run it inside the project directory. It didn't work if I run it outside the project directory because it read the system file and can't find the embedded login template using Go embed embed.FS.
Is it possible that ab.Config.Core.ViewRenderer supports template files from embed.FS?
I have a Go app that embeds all HTML templates. Using authboss I need to provide login page template like this:
ab.Config.Core.ViewRenderer = abrenderer.NewHTML("/auth", "/views")
Then I store the login template
login.tpl
inside/views/html-templates/login.tpl
to override the built-in template. The login page shows the correct template if I run it inside the project directory. It didn't work if I run it outside the project directory because it read the system file and can't find the embedded login template using Go embedembed.FS
.Is it possible that
ab.Config.Core.ViewRenderer
supports template files fromembed.FS
?Thank you.