github.com/whyrusleeping/tinyhtml

An HTML minimizer written in pure Go for use in webserver applications, which by the way, Go is amazing at.


Install
go get github.com/whyrusleeping/tinyhtml

Documentation

TinyHtml

A small html minimizer for use in web servers. Generally reduces size of code around 10-15%

Usage:

file,_ := os.Open("Somefile.html")
minHtml := tinyhtml.New(file)

//Assuming you are using it in a http request handler
http.ServeContent(w,r,"My Page", time.Now(), minHtml)

The Minimizer class is a wrapper over any io.Reader interface that also implements the io.Reader interface.