Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/expr-lang/expr
/ New
Function
New
conf/config.go:64–68 ·
view source on GitHub ↗
New creates new config with environment.
(env any)
Source
from the content-addressed store, hash-verified
62
63
// New creates new config with environment.
64
func
New(env any) *Config {
65
c := CreateNew()
66
c.WithEnv(env)
67
return
c
68
}
69
70
func
(c *Config) WithEnv(env any) {
71
c.EnvObject = env
Callers
15
TestCheck
Function · 0.92
TestCheck_error
Function · 0.92
TestCheck_FloatVsInt
Function · 0.92
TestCheck_IntSums
Function · 0.92
TestCheck_AllowUndefinedVariables
Function · 0.92
TestCheck_AllowUndefinedVariables_DefaultType
Function · 0.92
TestCheck_AllowUndefinedVariables_OptionalChaining
Function · 0.92
TestCheck_TypeWeights
Function · 0.92
TestCheck_works_with_nil_types
Function · 0.92
TestCheck_cast_to_expected_works_with_interface
Function · 0.92
TestCheck_operator_in_works_with_interfaces
Function · 0.92
TestCheck_dont_panic_on_nil_arguments_for_builtins
Function · 0.92
Calls
2
CreateNew
Function · 0.85
WithEnv
Method · 0.80
Tested by
15
TestCheck
Function · 0.74
TestCheck_error
Function · 0.74
TestCheck_FloatVsInt
Function · 0.74
TestCheck_IntSums
Function · 0.74
TestCheck_AllowUndefinedVariables
Function · 0.74
TestCheck_AllowUndefinedVariables_DefaultType
Function · 0.74
TestCheck_AllowUndefinedVariables_OptionalChaining
Function · 0.74
TestCheck_TypeWeights
Function · 0.74
TestCheck_works_with_nil_types
Function · 0.74
TestCheck_cast_to_expected_works_with_interface
Function · 0.74
TestCheck_operator_in_works_with_interfaces
Function · 0.74
TestCheck_dont_panic_on_nil_arguments_for_builtins
Function · 0.74