Added separate Eval mode with option to isolate the environment

This allows for keeping variables isolated
This commit is contained in:
Leon Mika 2025-05-25 09:50:25 +10:00
parent 2e8e60f904
commit d8460f69bc
15 changed files with 176 additions and 58 deletions

View file

@ -28,7 +28,7 @@ func TestOS_Env(t *testing.T) {
inst := ucl.New(
ucl.WithModule(builtins.OS()),
)
res, err := inst.Eval(context.Background(), tt.eval)
res, err := inst.EvalString(context.Background(), tt.eval)
assert.NoError(t, err)
assert.Equal(t, tt.want, res)
})