Skip to content

Commit

Permalink
Update README.md (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
Or-Geva authored Mar 31, 2021
1 parent b91278b commit edc3719
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ params.Target = "repo/path/"

summary, err := rtManager.UploadFilesWithSummary(params)
defer summary.Close()
reader, totalDownloaded, totalExpected, err := rtManager.DownloadFilesWithResultReader(params)

// Iterate over each file
for currentFileInfo := new(utils.FileInfo); reader.NextRecord(currentFileInfo) == nil; currentFileInfo = new(utils.FileInfo) {
fmt.Printf("File path: %s\n", currentFileInfo.LocalPath)
}

if err := reader.GetError(); err != nil {
return err
}
```
Read more about [ContentReader](#using-contentReader).

Expand Down Expand Up @@ -1203,7 +1213,7 @@ defer func() {

// Iterate over the results.
for currentResult := new(ResultItem); reader.NextRecord(currentResult) == nil; currentResult = new(ResultItem) {
fmt.Printf("Found artifact: %s of type: %s\n", searchResult.Name, searchResult.Type)
fmt.Printf("Found artifact: %s of type: %s\n", currentResult.Name, currentResult.Type)
}
if err := resultReader.GetError(); err != nil {
return err
Expand Down

0 comments on commit edc3719

Please sign in to comment.