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

refactor: cloudinit pointer removal #316

Merged
merged 1 commit into from
Dec 13, 2021
Merged

refactor: cloudinit pointer removal #316

merged 1 commit into from
Dec 13, 2021

Conversation

richardcase
Copy link
Member

What this PR does / why we need it:

A small refactor to the cloudinit package to remove pointers where
possible so that its more user friendly to consume.

In the struct definitions we have tried to remove usage of pointers and instead rely on the behavior of json
marshalling and omitempty. Its slightly tricky with boolean values so for these we use *bool vs bool. The
reason is that the default value for some cloudinit values is true which isn't the same as the default for bool.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

A small refactor to the **cloudinit** package to remove pointers where
possible so that its more user friendly to consume.

In the struct definitions we have tried to remove usage of pointers and instead rely on the behavior of json
marshalling and `omitempty`. Its slightly tricky with boolean values so for these we use *bool vs bool. The
reason is that the default value for some cloudinit values is true which isn't the same as the default for bool.

Signed-off-by: Richard Case <[email protected]>
@richardcase richardcase merged commit d045e5f into liquidmetal-dev:main Dec 13, 2021
@richardcase richardcase deleted the refactor_cloud_init branch December 13, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactor Only refactoring changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants