func dosomething(w http.ResponseWriter, r *http.Request) {
//Create Context
ctx := context.Background()
// Creates a client.
cli, err := datastore.NewClient(ctx, ProjectID) //projectID
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
e, err := NewObjectFromData(ctx, cli, r.FormValue("parameter"))
if err != nil {
log.Fatalf("Error Running NewObjectFromData %v", err)
}
c, err:= e.FindSomeOfTheChildren(ctx, cli)
if err != nil {
log.Fatalf("Error Running FindSomeOfTheChildren %v", err)
}
//Do Something to e
//Save Changes to e
err = e.DBSave(ctx, cli)
if err != nil {
log.Fatalf("Error Saving Object back to datastore %v", err)
}
ro := Returnobject {}
ro.Status = OK
j, err := json.Marshal(ro)
if err != nil {
log.Fatalf("Error Parsing Json")
}
w.Write(j)
return
}