go-commonmark is a Go (golang) wrapper for the CommonMark C library
1.) First, install CommonMark located at: https://github.com/jgm/CommonMark
2.) Make sure the directory you install libcmark to is somewhere your system will find it at runtime (i.e., somewhere in your /etc/ld.so.conf: /usr/lib, etc.). Or you can be lazy and add its location to your LD_LIBRARY_PATH.
3.) Then, just:
go get github.com/rhinoman/go-commonmark
Note: The C library is still considered 'pre-release' and is under fairly heavy development. Thus, changes that break this wrapper can happen from time to time, and I'll be playing catch-up when that occurs. It's probably best to use of one of the tags with it's corresponding version branch/tag of CommonMark (0.16 is the most recent as of this writing).
See the Godoc: http://godoc.org/github.com/rhinoman/go-commonmark
If all you need is to convert CommonMark text to Html, just do this:
import "github.com/rhinoman/go-commonmark"
...
htmlText := commonmark.Md2Html(mdText)