Skip to content

Instantly share code, notes, and snippets.

(function(){
// Set this to be the time you want the button clicked at
var click_at = 1;
// Convert click_at to milliseconds.
// Thanks to http://www.reddit.com/user/rec0rder for the fact that
// the button always rounds the ms up to get your click time.
click_at *= 1000;
// Compare to code at https://blog.merovius.de/2017/06/18/how-not-to-use-an-http-router.html
package main
import (
"log"
"net/http"
"github.com/go-util/router"
)
@weatherglass
weatherglass / main.go
Last active July 28, 2017 15:36
Comparing a mux to handwritten handlers
package main
import (
"log"
"net/http"
)
func main() {
go func() {
log.Println(http.ListenAndServe("127.0.0.1:8111", mux))