You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ > gomplate
** file.read **
map[a:1 b:c]
** ds **
map[a:1 b:c]
** range ds **
09:46:54 ERR error="failed to render template <arg>: template: <arg>:6:26: executing \"<arg>\" at <ds \"data\" .>: error calling ds: Unable to unmarshal array a: 1\r\nb: \"c\"\r\n: yaml: unmarshal errors:\n line 1: cannot unmarshal !!map into []interface {}"
I trust that you can see what is confusing me 😊 My Go is really rusty, but considering that the file is being unmarshalled to []interface {}, I guess this in file datasource.go (link to relevant line in tag v3.10.0) could be a place of interest:
But I'm not very confident in this finding, I didn't take too much time to dig into this yet. I do have a small concern on this snippet ignoring the YAML function's err, though 🤷♂️
Please let me know if I can help in this issue in any way. I'll circumvent this for now using the file functions. Cheers!
The text was updated successfully, but these errors were encountered:
Hmm... this seems to be a bug that's always existed... I'm a bit confused about why, but I'll dig into it.
I do have a small concern on this snippet ignoring the YAML function's err, though 🤷♂️
that's a fallback that's only hit if it fails to parse as YAML - from some quick debugging it doesn't seem it's hitting that code at all though... I'll update this issue when I find more.
I have a template with a datasource which is a directory of yaml files. I followed the example from documentation "Datasources / Directory datasources". I have a problem getting this to work.
Minimal example to demonstrate, maybe it'll help in helping me understand what's going on 😊
I trust that you can see what is confusing me 😊 My Go is really rusty, but considering that the file is being unmarshalled to
[]interface {}
, I guess this in filedatasource.go
(link to relevant line in tagv3.10.0
) could be a place of interest:But I'm not very confident in this finding, I didn't take too much time to dig into this yet. I do have a small concern on this snippet ignoring the YAML function's
err
, though 🤷♂️Please let me know if I can help in this issue in any way. I'll circumvent this for now using the file functions. Cheers!
The text was updated successfully, but these errors were encountered: