-
-
Save christopherhesse/6eefa116ef33d97c9ddd to your computer and use it in GitHub Desktop.
appengine
This file contains 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
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()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
payload=���������4����main13759.Object������Object�������String�����