876 questions
-2
votes
2
answers
97
views
How to use gorazor and iterate over a slice
I want to use gorazor a viewengine written in go that uses razor-Syntax. They provide an example which i tried to understand and adapt.
What is working
I want to iterate over a slices of movies and ...
1
vote
1
answer
86
views
Having trouble with Go Templates - wanting to display base/index.html layout across all pages
I've setup my handlers with little to no issue.
At the moment I've got an index.html page - which I've defined as "index", and I've got a login.html page - which is just a dummy form.
I ...
2
votes
1
answer
119
views
Can't iterate through lists in scalar blocks
I have a values.yaml file as follows:
myTest: |-
- name: app1
url: https://example.com/app1
- name: app2
url: https://example.com/app2
Now I want to deploy a Helm chart which has a ...
0
votes
0
answers
73
views
Helm Chart: conflict over non-global values with subchart
I encountered a weird situation in which a non-global configuration value from my own chart conflicts with one in the mysql subchart I reference. More specifically, the .Values.metrics.serviceMonitor ...
0
votes
1
answer
81
views
Helm Templates dockerconfigjson secret - Cannot unmarshal string into Go struct field Secret.data
I have defined a helm template like the one below to get a predefined set of private registries in values and create a dockerconfigjson type secret in the namespace if needed by copying the templates ...
-2
votes
2
answers
56
views
panic: template: patternm matches no files echo error [closed]
I'm trying to serve an html file with echo but whenever I run the program I get that panic error.
// where:
type TemplateRenderer struct {
templates *template.Template
}
func genTemplate(path ...
1
vote
0
answers
114
views
How to get nested dictionary values in Helm template?
I am creating helm template and try refrencing 2 variable both have dynamic value.
template.yaml
{{- define "lib.keys" }}
{{- $top := .top }}
{{ range $data_access := $top.Values....
1
vote
2
answers
194
views
Using Go Gin with nested template files
What I'm trying to achieve is using r.LoadHTMLGlob("./web/templates/**/*") and loading pages "dynamically". Both Go and Gin are very new to me, so I'm not sure what I'm doing is ...
0
votes
1
answer
96
views
Helm template how to include dynamic template
I have the following in my values
test:
- a
- b
- c
In my template, I have the following:
{{- range $.Values.test }}
...
someValue: {{ include "staticString" $ }}
...
{{- end }}
I ...
0
votes
0
answers
58
views
Restore visualization of Go Template value in IntelliJ after expanding variable name?
I opened a Helm chart in IntelliJ and it's really neat, the Go Template plugin is substituting variable values in for their definition with this green highlighted background:
And when I mouse-over 80 ...
0
votes
0
answers
101
views
Argo Workflow conditional app parameter in a CronWorkflow
With Argo Workflow I try to create a CronWorkflow who are scheduled once a day.
I want send a parameter to my app in condition of day of the week like :
kind: CronWorkflow
spec:
schedule: "0 10 ...
-1
votes
1
answer
70
views
Go template.ExecuteTemplate html data
index.html:
<h1>{{.Title}}</h1>
<h2>{{.Greeting}}</h2>
main.go:
var templatePath = "templates/"
var templates = template.Must(template.ParseGlob(templatePath + "...
1
vote
2
answers
99
views
In a Go template, how to add a line with a string value only if that value is non-empty?
I'd like to render a template with a struct containing a certain string field, say a Restaurant with a Name, such that if the Name is non-empty, it is printed on a line, but if it is empty, that line ...
1
vote
0
answers
210
views
Masking IP addresses, names, and emails in Grafana before downloading logs
I am fetching multiple logs from Loki in Grafana, and I want to mask sensitive data (like IP addresses, email addresses, and names) before downloading the logs using the Grafana UI.
The requirement is ...
1
vote
1
answer
347
views
Trouble with Server Side Events in HTMX and Go
I am having trouble getting HTMX to swap out a div after receiving SSE.
In Chrome I can clearly see the event was actually received. But HTMX doesn't seem to respond to it.
What am I missing?
The tab ...