start new:
tmux
start new with session name:
tmux new -s myname
| r := mux.NewRouter() | |
| // Single handler | |
| r.HandleFunc("/form", use(http.HandlerFunc(formHandler), csrf, logging) | |
| // All handlers | |
| http.Handle("/", recovery(r)) | |
| // Sub-routers | |
| apiMiddleware := []func(http.Handler) http.Handler{logging, apiAuth, json} |