public void generateFileFromTemplate(final String fileName, final String templateName) throws IOException
    {
        try (Writer out = outputManager.createOutput(fileName))
        {
            out.append(generateFromTemplate(ir.namespaces(), templateName));
        }
    }
Generate a file for the Ir based on a template.

@param fileName     to generate.
@param templateName for the file.
@throws IOException if an error is encountered when writing the output.
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/golang/struct/GolangGenerator.java