Skip to content

Instantly share code, notes, and snippets.

@leoantony72
Created October 19, 2022 15:13
Show Gist options
  • Save leoantony72/87f8ebf97501a013d66b9ef87bc76079 to your computer and use it in GitHub Desktop.
Save leoantony72/87f8ebf97501a013d66b9ef87bc76079 to your computer and use it in GitHub Desktop.
Go redis config file
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