You should use bufio.Scanner and sscanf instead of reading the file into memory and splitting