Files
mgmt/examples/lang/datetime4.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

12 lines
259 B
Plaintext

import "datetime"
import "golang"
import "sys"
import "example"
$now = datetime.now()
file "/tmp/mgmt-datetime" {
state => $const.res.file.state.exists,
content => golang.template("Il est l'or Monseignor: {{ . }}\n", datetime.format($now, "15:04:05")),
}