I don't think this template function should be in any way authoritative, so let's namespace it.
15 lines
235 B
Plaintext
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),
|
|
}
|