MCPcopy Create free account
hub / github.com/darjun/go-daily-lib / HomeHandler

Function HomeHandler

goth/github/main.go:38–45  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

36}
37
38func HomeHandler(w http.ResponseWriter, r *http.Request) {
39 user, err := gothic.CompleteUserAuth(w, r)
40 if err != nil {
41 http.Redirect(w, r, "/login/github", http.StatusTemporaryRedirect)
42 return
43 }
44 ptTemplate.ExecuteTemplate(w, "home.tpl", user)
45}
46
47func AuthHandler(w http.ResponseWriter, r *http.Request) {
48 gothic.BeginAuthHandler(w, r)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected