-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Consul template manager #1783
Consul template manager #1783
Conversation
dafe298
to
e8712e7
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.
LGTM! Nothing critical in comments.
taskEnv *env.TaskEnvironment) (*TaskTemplateManager, error) { | ||
|
||
// Check pre-conditions | ||
if hook == 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.
This will miss the case of someone creating a var like var hook *MyTaskHook
, never initializing it, and passing it in. It will be a non-nil interface with a nil value.
I don't think it's worth trying to guard against that case, but I thought it was worth pointing out these kinds of guards are imperfect.
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.
Hm, either NewTaskTemplateManager is only called from tests or its non-test callers have been trimmed from the PR.
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.
Yeah this just the library PR, the use of it is in the next
Wait: &watch.Wait{}, | ||
} | ||
|
||
ctmpls[*ct] = tmpl |
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.
Skip the &
above to skip the dereferencing here
e8712e7
to
45531b1
Compare
45531b1
to
1c24f59
Compare
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
No description provided.