Skip to content
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: Embed template for root file generation #3319

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

barr-code
Copy link
Contributor

This PR embeds the root_.gotpl file used for generating the rootFile rather than searching for that template at runtime. This change will allow codegen to be packaged as part of a binary without relying on root_.gotpl existing within the user's local file structure.

This PR will resolve this issue: #3168

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@coveralls
Copy link

coveralls commented Oct 7, 2024

Coverage Status

coverage: 58.896% (+0.01%) from 58.882%
when pulling 124ec3f on barr-code:embed_root_template
into 828f152 on 99designs:master.

@@ -129,24 +127,18 @@ func addBuild(filename string, p *ast.Position, data *Data, builds *map[string]*
}
}

// go:embed root_.gotpl
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like an extra space by accident here!

@StevenACoffman StevenACoffman merged commit 354ef60 into 99designs:master Oct 9, 2024
17 checks passed
@StevenACoffman
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants