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 support for typed map and slices with method calls #88

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

tw1nk
Copy link
Contributor

@tw1nk tw1nk commented Nov 2, 2022

I noticed that gval didn't support expressions for typed maps and slice method call.

Example map:

type MyMap map[string][]int

func (m MyMap) Sum(key string) int {
    values, ok := m[key]
    if !ok {
        return -1
    }
    sum := 0
    for _, v := range values {
        sum += v
    }
    return sum
}

@generikvault
Copy link
Collaborator

thank you

@generikvault generikvault merged commit d0a223b into PaesslerAG:master Feb 6, 2023
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