(approval string)
| 20 | } |
| 21 | |
| 22 | func (req *ApprovalRequest) updateApproval(approval string) { |
| 23 | req.mu.Lock() |
| 24 | defer req.mu.Unlock() |
| 25 | |
| 26 | if req.done { |
| 27 | return |
| 28 | } |
| 29 | |
| 30 | req.approval = approval |
| 31 | req.done = true |
| 32 | |
| 33 | if req.onCloseUnregFn != nil { |
| 34 | req.onCloseUnregFn() |
| 35 | } |
| 36 | |
| 37 | close(req.doneChan) |
| 38 | } |
| 39 | |
| 40 | type ApprovalRegistry struct { |
| 41 | mu sync.Mutex |
no outgoing calls
no test coverage detected