lang: Add a resource-specific elvis operator
This allows you to omit a resource parameter programmatically, and avoids the need of an `undef` or `nil` in our language, which would contribute to programming errors, crashes, and overall reduced safety.
This commit is contained in:
5
examples/lang/elvis0.mcl
Normal file
5
examples/lang/elvis0.mcl
Normal file
@@ -0,0 +1,5 @@
|
||||
$b = true # change me to false and then try editing the file manually
|
||||
file "/tmp/mgmt-elvis" {
|
||||
content => $b ?: "hello world\n",
|
||||
state => "exists",
|
||||
}
|
||||
Reference in New Issue
Block a user