mirror of
https://github.com/nxshock/csv2db.git
synced 2024-11-27 03:31:00 +05:00
17 lines
225 B
Go
17 lines
225 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func processCsvFile(filePath string) error {
|
||
|
f, err := os.Open(opts.FilePath)
|
||
|
if err != nil {
|
||
|
return fmt.Errorf("open file: %v", err)
|
||
|
}
|
||
|
defer f.Close()
|
||
|
|
||
|
return processReader(f)
|
||
|
}
|