Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <!--
- I have the folling variables set from the server-side go-code:
- for _, issue := range issues {
- parse[*issue.ID] = strconv.Itoa(*issue.ID) // This one is global...
- parse[strconv.Itoa(*issue.ID)+"-label"] = "blah blah" // This one is also global
- }
- -->
- {{ range .issues }}
- {{ $ID := .ID }}
- <p>{{ index $.$ID "author" }}</p> <!-- How do I use a variable such as $ID as a global variable such as $.MYID? -->
- {{ end }}
- </body>
- </html>
- <!--
- God damn this question is so complicated but hopefully you understand...
- $.$ID returns the error:
- bad character U+0024 '$'
- along with a panic.
- -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement