./DAO.go:125: cannot use func literal (type func("context".Context) error) as type func("golang.org/x/net/context".Context) error in argument to "google.golang.org/appengine/datastore".RunInTransaction
func MyFunction(c context.Context, f func(tc context.Context) (bool, error, *Build), opts *datastore.TransactionOptions) error {
// do some stuff
err := datastore.RunInTransaction(c, func(tc context.Context) error {
var innerError error
didSaveBuild, innerError, build = f(tc)
return innerError
}, opts)
// do more
return err
}
--
You received this message because you are subscribed to a topic in the Google Groups "google-appengine-go" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine-go/G_aq-B2x3-w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine-go/7801ad48-5f70-477c-aed9-f5b0d60b202c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.