Aliaksandr Valialkin

Results 626 comments of Aliaksandr Valialkin

Just split the original template func into two template funcs: 1) The first one - `p.PageContents` - calls `p.SVGSymbol`, which remembers the content required for the embedded SVG inside `p`....

Yes, it is quite similar to the issue described in #58 . Unfortunately the solution proposed by @stevielj looks quite complicated from user PoV. That's why it isn't implemented yet...

You can try to put all the `Write*` functions from `quicktemplate` into a global map: ```go var templates = map[string]func(w io.Writer, data authboss.HTMLData) { "login_page": templates.WriteLoginPage, "main_page": templates.WriteMainPage, } ```...

> Could you explain me better what you mean by: > > > Probably it would be better to don't use `authboss.Renderer` abstraction. > > I think it's the only...

> I tried with factory pattern. What do you think? I think it is better to use plain old `switch` instead: ```go // WritePage write page for the given templateName...

This approach looks OK from the first sight.

Both versions look almost identical. Take the simplest version which will be easier to understand and maintain in the future. As for the performance, both versions contain superfluous memory allocation...

> Can I ask you what are you using for authentication when you cannot use third-party services (e.g. auth0)? I usually abstract away the authentication into a separate package `auth`...

@tural-esger , [hero](https://github.com/shiyanhui/hero) syntax and template model looks quite complicated comparing to `quicktemplate`. As for the performance, this may be related to the fact that `quicktemplate` allows output streaming without...

@b3b00 , what is the use case for custom delimiters? Custom delimiters may fragment and complicate the experience with `quicktemplate` templates, since these delimiters must be supported by external tools...