package main
import (
"os"
"bufio"
)
func readFirstLineFromFile(path string) (string, error) {
file, err := os.Open(path)
if err != nil {
return "", err
}
defer file.Close()
scanner := bufio.NewScanner(file)
scanner.Split(bufio.ScanLines)
scanner.Scan()
return scanner.Text(), nil
}