{"token":"abc","id":"zzz","email":"me"}
type profile struct { Token string `json:"token"` UserID string `json:"id"` Username string `json:"email"`}
func Login(e *Env, w http.ResponseWriter, r *http.Request) error {
...
p := &profile{ Token: "abc", Username: "me", UserID: "zzz", }
json.NewEncoder(w).Encode(p) return nil
}--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.