amber icon indicating copy to clipboard operation
amber copied to clipboard

Question about syntax.

Open iu0v1 opened this issue 9 years ago • 0 comments

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 :)

iu0v1 avatar Dec 29 '15 01:12 iu0v1