amber
amber copied to clipboard
Question about syntax.
Hello. I have some questions to a several things :)
1) How can I access to input data, if it's not a struct? (to simple array, for example)
-- main.go
...
data := []string{ "qwe", "rty", "uio"}
tmpl["test"].Execute(res, data)
-- test.amber
each $word in .
p #{$word}
I tried use .
#{}
#{.}
and blank - but it's not working.
2) How can I create empty attribute for a tag?
I need to create attribute with an empty value. <a testattr=""></a>
for example.
a[testattr]
- creates <a testattr></a>
a[testattr=""]
- submits "Unable to parse expression".
Thanks in advance, and thanks for a great package :)