Skip to content

Instantly share code, notes, and snippets.

@christopherhesse
Created November 20, 2014 02:54
Show Gist options
  • Save christopherhesse/6eefa116ef33d97c9ddd to your computer and use it in GitHub Desktop.
Save christopherhesse/6eefa116ef33d97c9ddd to your computer and use it in GitHub Desktop.
appengine
package hello
import (
"bytes"
"encoding/gob"
"net/http"
"appengine"
)
func init() {
gob.Register(Object{})
http.HandleFunc("/", handler)
}
type Object struct {
String string
}
func handler(w http.ResponseWriter, r *http.Request) {
buf := &bytes.Buffer{}
args := []interface{}{Object{}}
gob.NewEncoder(buf).Encode(args)
c := appengine.NewContext(r)
c.Infof("payload=%s", buf.Bytes())
}
@christopherhesse
Copy link
Author

payload= ���������4����main13759.Object������Object�������String� ����

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment