Files
iptvc/app/app.go
AnthonyAxenov ac062aa1ba
All checks were successful
release / release (push) Successful in 11m41s
Версия 1.0.5
2025-10-02 22:31:08 +08:00

43 lines
883 B
Go

/*
* Copyright (c) 2025, Антон Аксенов
* This file is part of iptvc project
* MIT License: https://git.axenov.dev/IPTV/iptvc/src/branch/master/LICENSE
*/
package app
import (
"axenov/iptv-checker/app/cache"
"axenov/iptv-checker/app/config"
"axenov/iptv-checker/app/logger"
"github.com/redis/go-redis/v9"
)
const VERSION = "1.0.5"
// Arguments описывает аргументы командной строки
type Arguments struct {
IniPath string
TagsPath string
RandomCount uint
NeedJson bool
NeedQuiet bool
Verbose bool
}
var (
Args Arguments
Cache *redis.Client
Config *config.Config
)
// Init инициализирует конфигурацию и подключение к keydb
func Init() {
Config = config.Init()
logger.Init(Args.NeedQuiet)
if Config.Cache.IsEnabled {
Cache = cache.Init(&Config.Cache)
}
}