Skip to content

Commit 6e10f3e

Browse files
committed
Use -out suffix on output files
1 parent 2bc88ed commit 6e10f3e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

batch-processing/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ func main() {
104104
for i, row := range inputRecords[1:] {
105105
url := row[0]
106106

107-
inputFilepath := fmt.Sprintf("/tmp/%d-%d.%s", time.Now().UnixMilli(), rand.Int(), "jpg")
108-
outputFilepath := fmt.Sprintf("/tmp/%d-%d.%s", time.Now().UnixMilli(), rand.Int(), "jpg")
107+
prefix := fmt.Sprintf("/tmp/%d-%d", time.Now().UnixMilli(), rand.Int())
108+
inputFilepath := fmt.Sprintf("%s.%s", prefix, "jpg")
109+
outputFilepath := fmt.Sprintf("%s-out.%s", prefix, "jpg")
109110

110111
log.Printf("downloading: row %d (%q) to %q\n", i, url, inputFilepath)
111112

0 commit comments

Comments
 (0)