adhocteam / pushup

Pushup is for making modern, page-oriented web apps in Go
https://pushup.adhoc.dev
MIT License
840 stars 30 forks source link

Inline partials inside a ^for #41

Open paulsmith opened 1 year ago

paulsmith commented 1 year ago

This currently doesn't work as you might expect, and is ill-defined.

The codegen generates one partial type implementing Responder, but its output is wrapped in the for.

It's not really possible to request a single partial inside the for.

It's a weird mix of runtime state (the values of induction variable(s) of the for loop) and comp-time state (the definition of the partial). Maybe it's a parameterized type over the induction variable(s), which gets passed in somehow ...