(graceShutdownC chan struct{})
| 168 | } |
| 169 | |
| 170 | func action(graceShutdownC chan struct{}) cli.ActionFunc { |
| 171 | return cliutil.ConfiguredAction(func(c *cli.Context) (err error) { |
| 172 | if isEmptyInvocation(c) { |
| 173 | return handleServiceMode(c, graceShutdownC) |
| 174 | } |
| 175 | func() { |
| 176 | defer sentry.Recover() |
| 177 | err = tunnel.TunnelCommand(c) |
| 178 | }() |
| 179 | if err != nil { |
| 180 | captureError(err) |
| 181 | } |
| 182 | return err |
| 183 | }) |
| 184 | } |
| 185 | |
| 186 | // In order to keep the amount of noise sent to Sentry low, typical network errors can be filtered out here by a substring match. |
| 187 | func captureError(err error) { |
no test coverage detected