func GenerateDocs(title, src string) string {
	sections := extractSections(src)
	highlightCode(sections)
	markdownComments(sections)
	var b bytes.Buffer
	err := templ.Execute(&b, docs{title, sections, style})
	if err != nil {
		panic(err.Error())
	}
	return b.String()
}
Extract comments from source code, pass them through markdown, highlight the
code, and render to a string.
package main
import (
	"bytes"
	"flag"
	"github.com/dhconnelly/litebrite"
	"github.com/russross/blackfriday"
	"go/build"
	"io/ioutil"
	"path/filepath"
	"regexp"
	"strings"
	"text/template"
)
var (
	templ  *template.Template                 
	style  string                             
	match  = regexp.MustCompile(`^\s* 
	sep    = "/*[docgoseparator]*/"           
	unsep  = regexp.MustCompile(`<div class="comment">/\*\[docgoseparator\]\*/</div>`)
	outdir = flag.String("outdir", ".", "output directory for docs")
	resdir = flag.String("resdir", "", "directory containing CSS and templates")
	pkg    = "github.com/dhconnelly/docgo"  
)
type docs struct {
	Filename string
	Sections []*section
	Style    string
}
type section struct {
	Doc  string
	Code string
}