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

feat: support map as parameter #1

Merged
merged 3 commits into from
Nov 22, 2023
Merged

Conversation

abichinger
Copy link
Member

@abichinger abichinger commented Nov 21, 2023

related: casbin/casbin#1328

expression, err := NewEvaluableExpression("foo.bar > 0")

parameters := make(map[string]interface{})
parameters["foo"] = map[string]int{
    "bar": -1,
}

result, err := expression.Evaluate(parameters)
// result is now set to "false"

@casbin-bot
Copy link
Member

@tangyang9464 @JalinWang @imp2002 please review

@abichinger abichinger changed the title support map as parameter feat: support map as parameter Nov 21, 2023
@hsluoyz
Copy link
Member

hsluoyz commented Nov 21, 2023

@abichinger hi, before this PR, can you first complete these two?

#2

#3

@hsluoyz
Copy link
Member

hsluoyz commented Nov 22, 2023

@abichinger plz fix:

image

@hsluoyz hsluoyz merged commit 97e0ed2 into casbin:master Nov 22, 2023
7 checks passed
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants