How can I traverse the nomad variable tree?

I tried to traverse the nomad variable tree like the following:

        data = <<EOH
{{ range nomadVarList "5gSystem" }}
{{ with nomadVar {{ .Path }} }}
{{- range .Tuples }}
{{ .K }}={{ .V }}
{{- end }}
{{ end }}
{{ end }}
EOH

but nomad reported an error:

Template failed: (dynamic): parse: template: :2: unexpected "{" in operand 

Nested {{ ? { is her eunexpected. Try:

{{ with nomadVar .Path }}

You might be interested in go template language template package - text/template - Go Packages .

Problem solved, thank you

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.