encoding/csv
Read and write CSV.
What Is CSV
CSV (comma-separated values) stores tabular data as plain text, one record per line, fields separated by commas. Go's encoding/csv package reads and writes it.
Reading from a String
Create a reader from any io.Reader. strings.NewReader wraps a string so we can demo without a file.
package main
import (
"encoding/csv"
"fmt"
"strings"
)
func main() {
r := csv.NewReader(strings.NewReader("a,b,c"))
rec, _ := r.Read()
fmt.Println(rec)
}