Skip to content

How can I update map fileds. #587

@v1xingyue

Description

@v1xingyue

I have some map fields in a Env , and a string content . Env struct is like this :

type Env struct {
    msg string
   fileds map[string]any
}

Now I want to add filed by the msg content , such as .

fileds["len"] = len(msgs)
fileds["uppper"] = uppper(msgs)

At last return the fields to the expr script caller.

How can I do that.

Thanks.

And I wonder why not provide built in much more map functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions