In Python, you can do this:
\"File {file} had error {error}\".format(file=myfile, error=err)
or this:
\"File %(file)s had e
Alas, there's no built-in function in Go for string interpolation with named parameters (yet). But you are not the only one suffering out there :) Some packages should exist, for example: https://github.com/imkira/go-interpol . Or, if feeling adventurous, you could write such a helper yourself, as the concept is actually quite simple.
Cheers, Dennis