-
Notifications
You must be signed in to change notification settings - Fork 21
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
More in depth refactoring of providers and modules #108
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
There's still a lot of copy-paste in the command structure I'll probably address that in a subsequent PR Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
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 wonder if adding a golangci-lint config and CI as part of this refactor would be a good thing. That way any issues with the code could now be caught early.
"log/slog" | ||
) | ||
|
||
type Repository struct { |
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.
Since this seems to be called sometimes without log
, maybe adding explicit constructor(s), even if not exported, would be beneficial? That would document what the required parameters are.
ghClient: c.ghClient, | ||
func (c Client) Repository(owner, name string, log *slog.Logger) Repository { | ||
return Repository{ | ||
client: Client{ |
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.
Does this not need a log
here? See my comment about constructors.
WIP
Fixes #30