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

15 lines
235 B
Plaintext

import "fmt"
import "golang"
import "example"
$answer = 42
$s = example.int2str($answer)
print "print1" {
msg => fmt.printf("an str is: %s", $s),
}
print "print2" {
msg => golang.template("an str is: {{ int2str . }}", $answer),
}