mirror of
https://github.com/MADTeacher/go_basics.git
synced 2025-11-23 21:34:47 +02:00
20 lines
363 B
Go
20 lines
363 B
Go
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)
|
|
}
|
|
}
|