-
Notifications
You must be signed in to change notification settings - Fork 114
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
20250301 go template tweaks #4823
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.
I'm not on the team that owns this, and defer to Ethan/Nicole.
@@ -49,22 +45,15 @@ func (cfg *Config) Validate(path string) ([]string, error) { | |||
} | |||
|
|||
type {{.ModelType}} struct { | |||
resource.AlwaysRebuild |
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.
👍 Great idea here! AlwaysRebuild should be the default used by 98% of components and services.
) | ||
|
||
func main() { | ||
err := realMain() |
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.
What's the purpose of this file? It seems to construct the resource and immediately shut everything down. Why bother?
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.
yes, it's so people know they can do it and boiler plate
deps := resource.Dependencies{} | ||
// can load these from a remote moachine if you need | ||
|
||
cfg := {{.ModuleLowercase}}.Config{} |
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.
Many resources have config fields that are required to be non-empty, so this feels wrong. but the resource constructed isn't used, so maybe it's okay...
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.
it's perfect
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.
looks good to me!
I just went with the reviewer suggestions, no idea if these are right