Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joakim Bygdell <joakim.bygdell@nbis.se>
  • Loading branch information
pahatz and jbygdell authored Oct 23, 2024
1 parent a471ce6 commit 1d3f898
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var pubKeyPath = Args.String("encrypt-with-key", "",
var accessToken = Args.String("accessToken", "", "Access token to the inbox service.\n(optional, if it is set in the config file or exported as the ENV `ACCESSTOKEN`)")

// Function uploadFiles uploads the files in the input list to the s3 bucket
func uploadFiles(files, outFiles []string, targetDir string, config *helpers.Config, configPath string) error {
func uploadFiles(files, outFiles []string, targetDir string, config *helpers.Config) error {
// check also here in case sth went wrong with input files
if len(files) == 0 {
return errors.New("no files to upload")
Expand Down Expand Up @@ -123,8 +123,6 @@ func uploadFiles(files, outFiles []string, targetDir string, config *helpers.Con

// create progress bar instance
p := mpb.New()
log.Infof("Uploading %s with config %s\n", filename, configPath)
fmt.Printf("Uploading %s with config %s\n", filename, configPath)

f, err := os.Open(path.Clean(filename))
if err != nil {
Expand Down Expand Up @@ -362,5 +360,5 @@ func Upload(args []string, configPath string) error {
}
}

return uploadFiles(files, outFiles, filepath.ToSlash(*targetDir), config, configPath)
return uploadFiles(files, outFiles, filepath.ToSlash(*targetDir), config)
}

0 comments on commit 1d3f898

Please sign in to comment.