Skip to content

Commit

Permalink
Update documentation and function name
Browse files Browse the repository at this point in the history
  • Loading branch information
kishaningithub committed Mar 8, 2020
1 parent 73f2f8b commit 42c1cc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/shopify-csv-download/main.go
Expand Up @@ -19,7 +19,7 @@ func main() {
exitOnFailure(fmt.Sprintf("unable to parse url %s", productsJsonURL), err)
logWithNewLine("Downloading products as CSV...")
watch := stopwatch.Start()
err = products.SaveAsImportableCSVWithProgressState(*productsJsonURL, os.Stdout, progressHandler)
err = products.SaveAsImportableCSVNotifyingProgressState(*productsJsonURL, os.Stdout, progressHandler)
exitOnFailure("unable to write products", err)
logWithNewLine("")
watch.Stop()
Expand Down
4 changes: 2 additions & 2 deletions pkg/products/writer.go
Expand Up @@ -17,8 +17,8 @@ func SaveAsImportableCSV(productsJsonURL url.URL, out io.Writer) error {
return <-err
}

// SaveAsImportableCSVWithProgressState saves products from the given url to given writer and returns the progress state using channels
func SaveAsImportableCSVWithProgressState(productsJsonURL url.URL, out io.Writer, onProgressHandler ProgressHandler) error {
// SaveAsImportableCSVNotifyingProgressState saves products from the given url to given writer and notifies the progress state
func SaveAsImportableCSVNotifyingProgressState(productsJsonURL url.URL, out io.Writer, onProgressHandler ProgressHandler) error {
progressState, err := products.
Stream(productsJsonURL).
ConvertToCSV().
Expand Down

0 comments on commit 42c1cc6

Please sign in to comment.