TakeError returns the error and clears it
()
| 346 | |
| 347 | // TakeError returns the error and clears it |
| 348 | func (e *Error) TakeError() error { |
| 349 | if e == nil || e.kind == ErrKindOK { |
| 350 | return nil |
| 351 | } |
| 352 | result := *e |
| 353 | *e = Error{kind: ErrKindOK} |
| 354 | return result |
| 355 | } |
| 356 | |
| 357 | // CheckError returns the error if one occurred, nil otherwise |
| 358 | func (e *Error) CheckError() error { |
no outgoing calls