I'm writing some code that takes in a Docker-Compose.yml and unmarshals it into a struct. I take the docker compose data in as a []byte.
dockerData []byte
var struct *struct
if err := yaml.Unmarshal(dockerData, &struct)
I run a lot of compose files through this process. When errors are thrown, is there a way to output the line or section of the compose file that threw the error?