I have a flat file that has 339276 line of text in it for a size of 62.1 MB. I am attempting to read in all the lines, parse them based on some conditions I have and then insert
package main import ( "fmt" "os" "log" "bufio" ) func main() { FileName := "assets/file.txt" file, err := os.Open(FileName) if err != nil { log.Fatal(err) } defer file.Close() scanner := bufio.NewScanner(file) for scanner.Scan() { fmt.Println(scanner.Text()) } }