Skip to content

chore(refactor): Make interpolateAllResources more readable#106

Merged
kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
erezrokah:chore/interpolation
Sep 15, 2022
Merged

chore(refactor): Make interpolateAllResources more readable#106
kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
erezrokah:chore/interpolation

Conversation

@erezrokah
Copy link
Copy Markdown
Member

@erezrokah erezrokah commented Sep 14, 2022

Summary

It took me a bit of time to understand what's the purpose of this function as it uses negated logic and also len(tables) > 1 hides the equality check.

Did a bit of refactoring to make it easier (I hope) to understand and added tests for it


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@erezrokah erezrokah changed the title chore(refactor): Make interpolateAllResources more readable chore(refactor): Make interpolateAllResources more readable Sep 14, 2022
@kodiakhq kodiakhq bot merged commit b45c12e into cloudquery:main Sep 15, 2022
@erezrokah erezrokah deleted the chore/interpolation branch September 15, 2022 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants