add model

This commit is contained in:
SmileRex
2025-01-23 05:37:47 +03:00
parent fa97251aa9
commit 1970f09678
3 changed files with 13 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"bot/src/controllers"
"bot/src/handlers"
"bot/src/models"
"log"
"os"
"time"
@@ -11,7 +12,7 @@ import (
"gopkg.in/yaml.v3"
)
func config() controllers.Config {
func config() models.Config {
file, err := os.Open("cfg.yml")
if err != nil {
log.Fatal(err)
@@ -19,7 +20,7 @@ func config() controllers.Config {
defer file.Close()
// unmarshal the YAML data into a struct
var config controllers.Config
var config models.Config
err = yaml.NewDecoder(file).Decode(&config)
if err != nil {
log.Fatal(err)