I try parsing file
VAR1=https://com.domVAR2=abcd=efg=
by template
{{- range $path, $_ := $.Files.Glob $envPath }} {{- range split "\n" ($.Files.Get $path) }} {{- if . }} {{- $kv := splitList "=" . -}} {{- $k := first $kv}} {{- if contains "RAW_" $k }} {{- first $kv | replace "RAW_" "" | nindent 2}}: {{last $kv | quote }} {{ else}} {{- first $kv | nindent 2}}: {{last $kv | replace "'" "" | b64enc | quote }} {{- end }} {{- end }} {{- end }}{{- end }}{{- end }}
and got
data: VAR1: "aHR0cHM6Ly9jb20uZG9t" VAR2: ""
becouse splitList get last "=", but I want that splitList take only first "=" will take as seporator.note: base64 have "=" at your hashes.