I have pushed a lot of fixes now and sent a PR.<p>In the meanwhile, please see this working example on the Go playground: <a href="http:&#x2F;&#x2F;play.golang.org&#x2F;p&#x2F;voUfPGQulf" rel="nofollow">http:&#x2F;&#x2F;play.golang.org&#x2F;p&#x2F;voUfPGQulf</a>