Skip to content

Instantly share code, notes, and snippets.

@davidvthecoder
davidvthecoder / CSVwriterExample
Created October 9, 2013 18:32
Golang CSV Writer Example for a Web Application - Warning No error handling, just the basic concept.
import (
"../../web"
"bytes"
"encoding/csv"
}
func GenerateCSV(ctx *web.Context, args ...string) {
record := []string{"test1", "test2", "test3"} // just some test data to use for the wr.Writer() method below.