Client returns a Client that binds to current transaction.
()
| 157 | |
| 158 | // Client returns a Client that binds to current transaction. |
| 159 | func (tx *Tx) Client() *Client { |
| 160 | tx.clientOnce.Do(func() { |
| 161 | tx.client = &Client{config: tx.config} |
| 162 | tx.client.init() |
| 163 | }) |
| 164 | return tx.client |
| 165 | } |
| 166 | |
| 167 | func (tx *Tx) init() { |
| 168 | tx.Alert = NewAlertClient(tx.config) |
no test coverage detected