Created
October 19, 2022 15:13
-
-
Save leoantony72/87f8ebf97501a013d66b9ef87bc76079 to your computer and use it in GitHub Desktop.
Go redis config file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package config | |
import ( | |
"go/chat/utils" | |
"github.com/go-redis/redis/v9" | |
) | |
var Conn redis.Client | |
func NPool() { | |
rdb := redis.NewClient(&redis.Options{ | |
Addr: "localhost:6379", | |
Password: "", // no password set | |
DB: 0, // use default DB | |
}) | |
Conn = *rdb | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment