Skip to content

Playground result is different from the real library #848

@madesst

Description

@madesst

I think I found a small issue. The official playground seems to give a different answer than when I use the library in my go code.

Here's my code:

	evalResult, err := expr.Eval("type($env['date'])", map[string]interface{}{"date": "2025-11-12T12:12:12Z"})
	if err != nil {
		panic(err)
	}
	fmt.Println(evalResult)

It returns a string as evalResult
go playground

And here's a screenshot from the expr playground where it returns time.Time for the same expression:
Image

I thought they should both work the same way. Is this a bug or did I miss something?

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