test, examples: lang: Add new syntax for map lookup
Sugar at last!
This commit is contained in:
@@ -2,7 +2,7 @@ import "world"
|
||||
|
||||
$ns = "estate"
|
||||
$exchanged = world.kvlookup($ns)
|
||||
$state = map_lookup_optional($exchanged, $hostname, "default")
|
||||
$state = $exchanged[$hostname] || "default"
|
||||
|
||||
if $state == "one" or $state == "default" {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user