func VerifyToken(w http.ResponseWriter, r *http.Request) bool { checkRequest := &initialCheckRequest{r, make(chan *initialCheckResponse)} commChannel <- checkRequest x := <-checkRequest.responseChan nlog.Debugf("%+v\n", x) return x.authorized }
func defaultWikiBaseUrl(wikiaName, wikiaLang string) *url.URL { u := new(url.URL) baseHost := "wikia.com" u.Scheme = "http" if wikiaLang != "en" && wikiaLang != "" { u.Host = wikiaLang + "." + wikiaName + "." + baseHost } else { u.Host = wikiaName + "." + baseHost } nlog.Debugf("+v%", u) return u }
func waruj() { for r := range commChannel { nlog.Debugf("%+v", r.request.URL) r.responseChan <- &initialCheckResponse{true} } }