17 lines
339 B
Go
17 lines
339 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,
|
|
})
|
|
}
|