-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
feat: org imports on format #793
Conversation
84cd57c
to
b9837aa
Compare
b9837aa
to
d15ddbd
Compare
Looking good! I'll give it a proper review when I can. Thanks so much for this, it's such a cool feature. |
No problem! Let me know if you have questions about the code, or any changes for me to make. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor naming thing, I'll pick it up. Thanks!
// Generate code. | ||
gw := bytes.NewBuffer(nil) | ||
var updatedImports []*ast.ImportSpec | ||
var eg errgroup.Group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL about errgroup...
generator/generator.go
Outdated
// var templ_7745c5c3_CSSBuilder strings.Builder | ||
if _, err = g.w.WriteIndent(indentLevel, "var templ_7745c5c3_CSSBuilder strings.Builder\n"); err != nil { | ||
// templ_7745c5c3_CSSBuilder, _, release := templruntime.WriterToBuffer(nil) | ||
if _, err = g.w.WriteIndent(indentLevel, "templ_7745c5c3_CSSBuilder, _, release := templruntime.WriterToBuffer(nil)\n"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think release
should be called templ_7745c5c3_release
.
generator/generator.go
Outdated
if _, err = g.w.WriteIndent(indentLevel, "templ_7745c5c3_CSSBuilder, _, release := templruntime.WriterToBuffer(nil)\n"); err != nil { | ||
return err | ||
} | ||
if _, err = g.w.WriteIndent(indentLevel, "defer release()\n"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per above... templ_7745c5c3_release()
No description provided.