Files
mgmt/examples/lang/consul2.mcl
James Shubin 29eebd0d07 lang: core: Move template to golang namespace
I don't think this template function should be in any way authoritative,
so let's namespace it.
2024-09-13 15:51:24 -04:00

9 lines
176 B
Plaintext

import "datetime"
import "golang"
$d = datetime.now()
consul:kv "love" {
key => "mgmt/time",
value => golang.template("hello! it is now: {{ datetime_print . }}\n", $d),
}