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

Extract status page templates to files #147

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

colega
Copy link
Contributor

@colega colega commented Mar 29, 2022

What this PR does:

Instead of having a const with a huge string, now we have .gohtml files that are properly understood by the IDEs (at least by Goland) and we embed them into global string vars using the //go:embed directive.

Also standarized how both status pages templates for ring and memberlist are initialized.

Which issue(s) this PR fixes:

Cleaning up for #148

Checklist

  • Tests updated
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX] (not needed since this only changes unexported vars)

Instead of having a const with a huge string, now we have .gohtml files
that are properly understood by the IDEs (at least by Goland) and we
embed them into global string vars using the //go:embed directive.

Also standarized how both status pages templates for ring and memberlist
are initialized.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega mentioned this pull request Mar 29, 2022
2 tasks
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Yes!

@colega colega merged commit fc0ae59 into main Mar 29, 2022
@colega colega deleted the extract-status-page-templates-to-files branch March 29, 2022 15:15
@pstibrany
Copy link
Member

❤️ go:embed still feels like cheating, it's so nice to have that in the language.

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