Skip to content

Instantly share code, notes, and snippets.

Last active Jun 15, 2019
What would you like to do?
CSV Writer - Go Colly Advanced
func main() {
fileName := "amazon_products.csv"
file, err := os.Create(fileName)
if err != nil {
log.Fatalf("Could not create %s", fileName)
defer file.Close()
writer := csv.NewWriter(file)
defer writer.Flush()
writer.Write([]string{"Product Name", "Stars", "Price"})
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment