Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Deprecated WriteFilesToStreamWithProgressBar() #73

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
clean
  • Loading branch information
noyshabtay committed Sep 2, 2024
commit 5e7f83ced3ef56f6e0dc1ecfbde742ab270f31ed
11 changes: 0 additions & 11 deletions http/filestream/filestream.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"os"

ioutils "github.com/jfrog/gofrog/io"
"github.com/schollz/progressbar/v3"

Check failure on line 13 in http/filestream/filestream.go

View workflow job for this annotation

GitHub Actions / Static-Check

"github.com/schollz/progressbar/v3" imported as progressbar and not used (typecheck)

Check failure on line 13 in http/filestream/filestream.go

View workflow job for this annotation

GitHub Actions / test (ubuntu)

"github.com/schollz/progressbar/v3" imported as progressbar and not used

Check failure on line 13 in http/filestream/filestream.go

View workflow job for this annotation

GitHub Actions / Go-Sec

"github.com/schollz/progressbar/v3" imported as progressbar and not used

Check failure on line 13 in http/filestream/filestream.go

View workflow job for this annotation

GitHub Actions / Go-Sec

"github.com/schollz/progressbar/v3" imported as progressbar and not used

Check failure on line 13 in http/filestream/filestream.go

View workflow job for this annotation

GitHub Actions / test (windows)

"github.com/schollz/progressbar/v3" imported as progressbar and not used

Check failure on line 13 in http/filestream/filestream.go

View workflow job for this annotation

GitHub Actions / test (macOS)

"github.com/schollz/progressbar/v3" imported as progressbar and not used
)

const (
Expand Down Expand Up @@ -69,11 +69,6 @@
}

func WriteFilesToStream(multipartWriter *multipart.Writer, filesList []*FileInfo) (err error) {
return WriteFilesToStreamWithProgressBar(multipartWriter, filesList, nil)
}

// Deprecated: Use WriteFilesToStream instead
func WriteFilesToStreamWithProgressBar(multipartWriter *multipart.Writer, filesList []*FileInfo, bar *progressbar.ProgressBar) (err error) {
// Close finishes the multipart message and writes the trailing
// boundary end line to the output, thereby marking the EOF.
defer ioutils.Close(multipartWriter, &err)
Expand All @@ -82,12 +77,6 @@
// Returning the error from writeFile with a possible error from the writeErr function
return errors.Join(err, writeErr(multipartWriter, file, err))
}
if bar != nil {
err = bar.Add(1)
if err != nil {
return fmt.Errorf("failed to update progress bar: %w", err)
}
}
}

return nil
Expand Down
Loading