func NewHTMLDoc(dir string) (*HTMLDoc, error) {
	err := os.MkdirAll(dir, 0755)
	if err != nil {
		return nil, err
	}
	return &HTMLDoc{
		dir: dir,
	}, nil
}
NewHTMLDoc creates a new HTML documenter. The HTML documentation is
created in the argument directory. The function will create the
directory if it does not exist.
package main
import (
	"fmt"
	"html"
	"io"
	"os"
	"path"
	"strings"
)
type HTMLDoc struct {
	dir string
}