The functionality should be equivalent to the GitHub Markdown API endpoint specified at https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode, except the rendering is performed locally.
See usage example at https://github.com/shurcooL/go/blob/master/u/u1/main.go
github_flavored_markdown package builds on top of blackfriday, bluemonday, github.com/sourcegraph/syntaxhighlight so the code is very short. It currently only supports highlighting for `diff` and `Go`, but other languages can be added analogously (syntaxhighlight can be used for most as a pretty good generic highlighter). I'm still looking for a good unified interface for all the highlighters to refactor that code. Issues/PRs welcome.
I've also added an example of how to generate a complete HTML page, including the required CSS style sheet.