func applyCursor(query_in *datastore.Query, cursor_in string) (query_out *datastore.Query, err error) { if cursor_in != "" { cursor, err := datastore.DecodeCursor(cursor_in) if err == nil { return query_in.Start(cursor), nil } else { return query_in, err } } else { return query_in, nil } }