You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Batch Work example,The email.Value will be nil when called batch.Cancel() that will cause Panic as a result of wrong type desertation
for email := range batch.Results() {
if err := email.Error(); err != nil {
// handle error
// maybe call batch.Cancel()
}
// use return value
// The email.Value will be nil when called batch.Cancel() that will cause Panic as a result of wrong type desertation
fmt.Println(email.Value().(bool))
}
It might be good to write like this
for email := range batch.Results() {
if err := email.Error(); err != nil {
// handle error
// maybe call batch.Cancel()
}else{
// use return value
fmt.Println(email.Value().(bool))
}
The text was updated successfully, but these errors were encountered:
In the Batch Work example,The email.Value will be nil when called batch.Cancel() that will cause Panic as a result of wrong type desertation
It might be good to write like this
The text was updated successfully, but these errors were encountered: