-
Notifications
You must be signed in to change notification settings - Fork 43
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
Use type alias for Template #71
Conversation
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.
LGTM
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 pulled your branch and saw we're still importing upstream's template
package into ours.
default_template.go
:Template
andFromGlobs
are used in theForTests
function. Both of them are already part of ourtemplate
package.default_template_test.go
: This is a test file so I wouldn't worry about it.funcs.go
:DefaultFuncs
is taken from upstream.template_data.go
: There are some public types and functions (ExtendData
,TmplText
) that use the upstream package.
I don't think the imported types could be a concern, but the ExtendData
and TmplText
functions would force us to use the upstream package if we want to use them. Is this something that we could run into?
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.
LGTM 👍
This PR internalizes the usage of alertmanager's Template and updates all public functions and methods to use the type alias. This is a follow up for #63 (comment)