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: fix ge val nil panic #24

Merged
merged 5 commits into from
Mar 1, 2024
Merged

fix: fix ge val nil panic #24

merged 5 commits into from
Mar 1, 2024

Conversation

HeyJavaBean
Copy link
Member

@HeyJavaBean HeyJavaBean commented Mar 1, 2024

What type of PR is this?

fix

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

try:

struct FieldFilterI64 {
    
     1: optional i64 Gte

    
     2: optional i64 f1 ( vt.ge="$Gte")
     3: optional i64 f2 ( vt.ge="2")

     4: required i64 GteR
     5: optional i64 f3 ( vt.ge="$GteR")

}

and

var lte int64 = 10
	ff := &c.FieldFilterI64{
		Gte: nil,
		F1: &lte,
		F2: &lte,
		F3: &lte,
	}

	err := ff.IsValid()
	if err != nil {
		panic(err)
	}

to show the panic.

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@HeyJavaBean HeyJavaBean requested review from a team as code owners March 1, 2024 06:56
@HeyJavaBean HeyJavaBean changed the title fix: fix panic fix: fix ge val nil panic Mar 1, 2024
@HeyJavaBean HeyJavaBean merged commit 78a2ab1 into cloudwego:main Mar 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants