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.
I have some map fields in a Env , and a string content . Env struct is like this :
Now I want to add filed by the msg content , such as .
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.