Created
October 3, 2012 02:09
-
-
Save ChimeraCoder/3824532 to your computer and use it in GitHub Desktop.
Sample template info passing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func serveEventCreate(w http.ResponseWriter, r *http.Request, cred *oauth.Credentials){ | |
if cred == nil { | |
respond(w, homeLoggedOutTmpl, nil) | |
} else { | |
respond(w, eventCreateTmpl, nil) | |
} | |
var twitter_id string | |
if err := getCookie(r, "twitter_id", &twitterInfo); err != nil { | |
http.Error(w, "Error getting twitter_id from cookie, "+err.Error(), 500) | |
return | |
} | |
twitter_id = strings.Join(twitterInfo, "") | |
//whatever you want to do | |
response(w, fooTemplate, twitter_id) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment