learning_go/headFirst/fourth/sub/sub.go
2025-08-26 19:45:51 +03:00

20 lines
305 B
Go

package sub
import (
"bufio"
"os"
"strconv"
)
func Kek(fileName string) []int {
var seg []int
counter := 0
file,_ := os.Open(fileName)
scanner := bufio.NewScanner(file)
for scanner.Scan() {
mid,_ := strconv.ParseInt(scanner.Text(),0,0)
seg = append(seg,int(mid))
counter++
}
return seg
}