This is a snippets of the first part of my code

package main

import ( "encoding/csv" "fmt" "os" )

func main() {

file, err := os.Open("Account_balances.csv")
if err != nil {
    fmt.Println("Error", err)
    return

}

defer file.Close()

reader := csv.NewReader(file)

record, err := reader.ReadAll()

if err != nil {

    fmt.Println("Error", err)

}

for value:= range record{ // for i:=0; i<len(record)

    fmt.Println("", record[value])

}

}


what i will however like to do is write a code thats saves the csv file in 
any database i.e sql, sqlite or postgresql using golang.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to