Версия 1.0.0
Some checks failed
release / release (push) Failing after 51m35s

This commit is contained in:
2025-05-09 17:58:40 +08:00
parent b689f3e799
commit 303ccdd02b
3 changed files with 1 additions and 15 deletions

View File

@@ -1,8 +1,5 @@
APP_DEBUG=false APP_DEBUG=false
HTTP_HOST=0.0.0.0
HTTP_PORT=8031
CACHE_ENABLED=false CACHE_ENABLED=false
CACHE_HOST=localhost CACHE_HOST=localhost
CACHE_PORT=6379 CACHE_PORT=6379

View File

@@ -13,7 +13,7 @@ import (
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
) )
const VERSION = "0.2.0" const VERSION = "1.0.0"
// Arguments описывает аргументы командной строки // Arguments описывает аргументы командной строки
type Arguments struct { type Arguments struct {

View File

@@ -16,7 +16,6 @@ import (
type Config struct { type Config struct {
DebugMode bool DebugMode bool
Cache CacheConfig Cache CacheConfig
Http HttpConfig
} }
// CacheConfig описывает конфигурацию подключения к keydb // CacheConfig описывает конфигурацию подключения к keydb
@@ -31,12 +30,6 @@ type CacheConfig struct {
IsActive bool IsActive bool
} }
// HttpConfig описывает конфигурацию веб-сервера
type HttpConfig struct {
Host string
Port uint
}
// Init инициализирует объект конфигурации из переменных окружения // Init инициализирует объект конфигурации из переменных окружения
func Init() *Config { func Init() *Config {
_ = godotenv.Load(".env") _ = godotenv.Load(".env")
@@ -51,10 +44,6 @@ func Init() *Config {
Db: readEnvInteger("CACHE_DB", 0), Db: readEnvInteger("CACHE_DB", 0),
Ttl: readEnvInteger("CACHE_TTL", 1800), Ttl: readEnvInteger("CACHE_TTL", 1800),
}, },
Http: HttpConfig{
Host: readEnv("HTTP_HOST", "0.0.0.0"),
Port: readEnvInteger("HTTP_PORT", 1380),
},
} }
} }