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

Add "weak_references" configuration #1

Merged
merged 2 commits into from
Nov 11, 2021
Merged

Conversation

Deardrops
Copy link
Collaborator

Adds a "use_weak_references" configuration that will:

  • Use a pointer type for struct fields that are a complex type
    • The behaviour can be overridden by setting "pointer: false" in the
      proceeding comment blocks
  • Sets the "omitempty: true" flag on fields matching the criteria.
    This can also be overriden by setting "omitempty: false"

Cherry-pick Khan#155

Adds a "use_weak_references" configuration that will:

  * Use a pointer type for struct fields that are a complex type
    * The behaviour can be overridden by setting "pointer: false" in the
      proceeding comment blocks
  * Sets the "omitempty: true" flag on fields matching the criteria.
    This can also be overriden by setting "omitempty: false"
The logic check was subtly flawed and would override
any omitempty: false comments
@Deardrops Deardrops merged commit 1cdeb2b into main Nov 11, 2021
@Deardrops Deardrops deleted the support-use-struct-references branch November 11, 2021 06:55
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.

2 participants