Files
mgmt/examples/lang/template0.mcl
James Shubin 046b21b907 lang: Refactor most functions to support modules
This is a giant refactor to move functions into a hierarchial module
layout. While this isn't entirely implemented yet, it should work
correctly once all the import bits have landed. What's broken at the
moment is the template function, which currently doesn't understand the
period separator.
2018-12-20 21:21:30 -05:00

14 lines
212 B
Plaintext

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