deref is a helper that creates a shallow copy of the pool with the same settings. We don't want to just dereference the pointer because that makes the copylock lint angry.
()
| 72 | // settings. We don't want to just dereference the pointer because that makes |
| 73 | // the copylock lint angry. |
| 74 | func (p *ErrorPool) deref() ErrorPool { |
| 75 | return ErrorPool{ |
| 76 | pool: p.pool.deref(), |
| 77 | onlyFirstError: p.onlyFirstError, |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | func (p *ErrorPool) panicIfInitialized() { |
| 82 | p.pool.panicIfInitialized() |