Пример #1
0
// A super widget, for all the batch jobs
func formValueFlightByKey(r *http.Request) (*oldfdb.Flight, error) {
	fdb := oldfgae.FlightDB{C: oldappengine.NewContext(r)}

	key, err := olddatastore.DecodeKey(r.FormValue("key"))
	if err != nil {
		return nil, fmt.Errorf("fdb-batch: %v", err)
	}
	f, err := fdb.KeyToFlight(key)
	if err != nil {
		return nil, fmt.Errorf("fdb-batch: %v", err)
	}
	return f, nil
}