Skip to content
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

Implement a common interface for the various resource types #24

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

chrisjohnson
Copy link
Contributor

@chrisjohnson chrisjohnson commented Jan 15, 2020

This way we can pass one common type into the templating package and it doesn't need to have special code variants for each type. Same with the workers. Also start stubbing out some of the remaining necessary functionality.

Also, apparently naked returns are bad practice, so clean up the code here to explicitly return named values

TODO: The Map() method needs to be fleshed out

@chrisjohnson chrisjohnson changed the title WIP Implement a common interface for the various resource types Jan 15, 2020
Copy link
Contributor

@grep-ir grep-ir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond the merge conflicts, LGTM

Instead of having branched logic for each type all over the place, make
them implement a common interface that provides a String() and Map()
method. Then the workers can be simplified

Also, start to flesh out the code for the workers more

Lastly, naked returns are apparently bad practice, so fix up to stop
using those
@chrisjohnson chrisjohnson merged commit bbbe245 into master Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants