(text string, completedText string, reader io.Reader, length int64, progressBar *visualization.ProgressBar)
| 162 | } |
| 163 | |
| 164 | func (e HttpExecutor) progressReader(text string, completedText string, reader io.Reader, length int64, progressBar *visualization.ProgressBar) io.Reader { |
| 165 | if length < 10*1024*1024 { |
| 166 | return reader |
| 167 | } |
| 168 | return visualization.NewProgressReader(reader, func(progress visualization.Progress) { |
| 169 | displayText := text |
| 170 | if progress.Completed { |
| 171 | displayText = completedText |
| 172 | } |
| 173 | progressBar.UpdateProgress(displayText, progress.BytesRead, length, progress.BytesPerSecond) |
| 174 | }) |
| 175 | } |
| 176 | |
| 177 | func (e HttpExecutor) writeMultipartBody(bodyWriter *io.PipeWriter, parameters []ExecutionParameter, cancel context.CancelCauseFunc) (string, int64) { |
| 178 | multipartSize := e.calculateMultipartSize(parameters) |
no test coverage detected