1
0
mirror of https://github.com/MADTeacher/go_basics.git synced 2025-11-23 21:34:47 +02:00
Files
go_basics/part_6/6.1/golang/todo/main.go

20 lines
363 B
Go
Raw Permalink Normal View History

2025-06-16 11:31:09 +03:00
package main
import (
"golang/todo/db"
"golang/todo/menu"
"time"
)
func main() {
// Создаем репозиторий
rep := db.NewSQLiteRepository()
// Создаем отложенное закрытие соединения
defer rep.Close()
// Бесконечный цикл
for {
menu.CreateMenu(rep)
time.Sleep(2 * time.Second)
}
}