Begin a new batch of uploads or downloads. Call this first, followed by one or more Add calls. The passed in callback will receive updates on progress.
(cfg AdapterConfig, cb ProgressCallback)
| 397 | // Begin a new batch of uploads or downloads. Call this first, followed by one |
| 398 | // or more Add calls. The passed in callback will receive updates on progress. |
| 399 | func (a *SSHAdapter) Begin(cfg AdapterConfig, cb ProgressCallback) error { |
| 400 | if err := a.adapterBase.Begin(cfg, cb); err != nil { |
| 401 | return err |
| 402 | } |
| 403 | a.ctx = a.adapterBase.apiClient.Context() |
| 404 | a.debugging = a.ctx.OSEnv().Bool("GIT_TRANSFER_TRACE", false) |
| 405 | return nil |
| 406 | } |
| 407 | |
| 408 | func (a *SSHAdapter) Trace(format string, args ...interface{}) { |
| 409 | if !a.adapterBase.debugging { |