16 lines
338 B
Go
16 lines
338 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"git/ecom/jira-bot/pkg/config"
|
||
|
"github.com/go-redis/redis/v8"
|
||
|
)
|
||
|
|
||
|
// Возвращает клиент редиса
|
||
|
func Redis(config config.ReidsConfig) *redis.Client {
|
||
|
return redis.NewClient(&redis.Options{
|
||
|
Addr: config.Host + ":" + config.Port,
|
||
|
Password: config.Password,
|
||
|
DB: config.Db,
|
||
|
})
|
||
|
}
|