Hello, I have an app that uses Go's standard template package. The app reads an xml file and passes the info to a template (snippet shown below) including a slice of structs that the template can range over. eg
{{- range $source:= $grant.SubSection "Funding Sources" }} Although the SubSection method returns an error when it fails, right now the template does not produce the expected output but the error is not report anywhere. Is there anyway to avoid these silent failures? Thanks, {{range $grant:= List "Research Funding History" -}} {{- $grant.Print "1. %s-%s (%s) %s. " "Funding Start Date, Funding End Date, Funding Role, Funding Title" -}} {{- range $source:= $grant.SubSection "Funding Sources" }} {{- $source.Print "%s, %s. $%s." "Program Name, Funding Organization || Other Funding Organization, Total Funding" -}} {{end}} {{- range $person:= $grant.SubSection "Other Investigators" -}} {{- $person.Print " %s," "Investigator Namex" -}} {{end}} {{end}} -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.