16 lines
325 B
Go
Executable File
16 lines
325 B
Go
Executable File
package config
|
|
|
|
import "github.com/joho/godotenv"
|
|
|
|
type Config struct {
|
|
Redis *RedisConfig
|
|
Database *DatabaseConfig
|
|
}
|
|
|
|
func LoadConfig() (*Config, error) {
|
|
_ = godotenv.Load()
|
|
redisConfig := LoadRedisConfig()
|
|
databaseConfig := LoadDatabaseConfig()
|
|
return &Config{Redis: redisConfig, Database: databaseConfig}, nil
|
|
}
|