This commit is contained in:
Alexander Pivkin
2025-08-28 15:57:11 +03:00
parent f88a392425
commit ce7565827e
5 changed files with 56 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
package sub
import (
"bufio"
"log"
"os"
)
func Kek(fileName string) []string {
var seg []string
file, err := os.Open(fileName)
if err != nil {
log.Fatal("Cannot open file")
}
scanner := bufio.NewScanner(file)
for scanner.Scan() {
seg = append(seg, scanner.Text())
}
file.Close()
return seg
}