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

Fix Conditional Logic for OmitemptyTag #255

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

abe-tetsu
Copy link
Contributor

Updated the conditional logic to return true when no value is specified for EnableClientJsonOmitemptyTag.

func (c *GenerateConfig) IsEnableClientJsonOmitemptyTag() bool {
	if c == nil {
		return true
	}

	if c.EnableClientJsonOmitemptyTag == nil {
		return true
	}

	return *c.EnableClientJsonOmitemptyTag
}

This ensures that the default behavior remains consistent and returns true when the configuration is not explicitly set.

@Yamashou Yamashou merged commit 27dbd21 into Yamashou:master Dec 19, 2024
1 check passed
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