public void generateMessageHeaderStub() throws IOException
    {
        final String messageHeader = "MessageHeader";
        try (Writer out = outputManager.createOutput(messageHeader))
        {
            final StringBuilder sb = new StringBuilder();
            final List<Token> tokens = ir.headerStructure().tokens();

            imports.push(new TreeSet<>());
            imports.peek().add("io");

            generateTypeDeclaration(sb, messageHeader);
            generateTypeBodyComposite(sb, messageHeader, tokens.subList(1, tokens.size() - 1));

            generateEncodeDecode(sb, messageHeader, tokens.subList(1, tokens.size() - 1), false, false);
            generateCompositePropertyElements(sb, messageHeader, tokens.subList(1, tokens.size() - 1));
            out.append(generateFileHeader(ir.namespaces()));
            out.append(sb);
            imports.pop();
        }
    }
Generate the composites for dealing with the message header.

@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