How to create html minifier?

package main

import (
    "fmt"
)

func HtmlMinify(html string) string {
    // todo: minify html
    return html
}

func main() {

    htmlExample := `<li>
                        <a>Hello</a>
                    </li>`
    minifiedHtml := HtmlMinify(htmlExample)
    fmt.Println(minifiedHtml) //  `<li><a>Hello</a></li>` is wanted
}

outputs:

<li>
                        <a>Hello</a>
                    </li>

But I want it to be

<li><a>Hello</a></li>