Questions tagged [pongo2]
6 questions
4
votes
1 answer
Lua data not being rendered on pongo2 template
I'm using algernon to try to output data from a lua script into a pongo2 template.
In the code below number_list outputs exactly as I'd expect but nothing renders for object_list.
What am I doing wrong?
title = "This is the title"
number_list =…

AppTest
- 491
- 1
- 7
- 23
1
vote
1 answer
How to call Go function from pongo template
I need to create JSON data using few keys of map and need to incorporate into html generated. I am using pongo2 library and want to write custom filter to achieve the same.
and coded custom…

Gaurav Pant
- 4,029
- 6
- 31
- 54
0
votes
0 answers
How do I create variables within a Pongo2 template?
TL;DR I need a way to set variables from within Pongo2 templates, not passing them in from my controller code to be usable in the global template scope (i.e. not in a with block).
I have just started learning Go and chose Fiber as my framework since…

Paul Norman
- 1,621
- 1
- 9
- 20
0
votes
1 answer
Golang pongo2 filter returns incorrect value
I created a pongo2 filter which should return Absolute value of the parameter passed in to the filter. However, the filter only returns correct answer if I pass the value as a parameter. But if I pass the value directly it returns incorrect…

niko85
- 303
- 2
- 12
0
votes
3 answers
How to generate and display coverage when running tests with Pongo for custom Kong API Gateway plugins written in Lua
I am writing a few kong custom plugins in Lua. I am using Kong 2.3.3 and Lua 5.1.
I have some test cases (unit tests + integration tests) and i am running them with pongo run -coverage option. I have already installed luacov (and also cluacov, both…

bovino Marcelo Bezerra
- 2,042
- 16
- 28
0
votes
0 answers
How can I register a function to use with pongo templates?
I want to be able to register a function in pongo2 to be able to use in the template. I don't want to use it as a filter. I want to call it as a function. How can I go about this? I don't see any method to RegisterFunction like I can…

coder0110
- 5
- 6