I suggest that you use the Model View Controller pattern, which is to say, you do all the data processing in Go and use your HTML template only to display the result. For example in your Go driver program, simply create a set of strings. to be displayed. For a successful backup, the string should be the HTML for the line containg the backup link. For a failed backup, it's the HTML for your failure message.
I wrote a tool that generates a simple web server from a JSON specification (https://github.com/goblimey/scaffolder). It makes heavy use of templates and they could have become horribly complicated. I avoided that using this technique. Fundamentally, it's much easier to write logic in Go than in templatese, and, of course, you can write unit tests tocheck that it works. -- 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.