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

predicates without quoting strings #28

Open
flashpixx opened this issue Jul 27, 2020 · 0 comments
Open

predicates without quoting strings #28

flashpixx opened this issue Jul 27, 2020 · 0 comments

Comments

@flashpixx
Copy link

Hello,

I'm using the call predicate.TextContains with that call .Has("lastName", predicate.TextContains("t") and this creates an error, because the passed variable content will not be quoted, I must replace it with .Has("lastName", predicate.TextContains(""t"")` .

In my opinion the definition of the function seems not be correct:

func TextContains(str string) *Predicate {
	s := "textContains(" + str + ")"
	a := Predicate(s)
	return &a
}

The fixed definition of the first function line should be

s := "textContains(\"" + str + "\")"

Other calls can be create similar issues.

Thx

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

No branches or pull requests

1 participant