-
Notifications
You must be signed in to change notification settings - Fork 113
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
Make additional info attribute configureable #1588
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
73f8c52
to
8aa4bec
Compare
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.
👍
@ishank011 can you make it configurable with a layout like we do for the home configuration, for example: |
1bc2925
to
46473dc
Compare
@labkode done |
46473dc
to
8652dbf
Compare
1948226
to
bb4f89d
Compare
@@ -73,6 +76,8 @@ func (h *Handler) Init(c *config.Config) error { | |||
h.sharePrefix = c.SharePrefix | |||
h.homeNamespace = c.HomeNamespace | |||
|
|||
h.additionalInfoTemplate, _ = template.New("additionalInfo").Parse(c.AdditionalInfoAttribute) |
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.
Are you not checking the error here because the only way it could fail is if the template has already been parsed? Otherwise, I think there is some value in error checking here, at least for debugging purposes.
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.
@refs I thought that we shouldn't fatal if the parsing fails. Similarly, in case executing the template fails, I didn't report an error but returned an empty string. I'll add a warning there
No description provided.