Skip to content

Instantly share code, notes, and snippets.

@Masum-Osman
Created July 4, 2022 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Masum-Osman/a1bafec1a9d7e8b70fe0c35f61990b24 to your computer and use it in GitHub Desktop.
Save Masum-Osman/a1bafec1a9d7e8b70fe0c35f61990b24 to your computer and use it in GitHub Desktop.
func init() {
fmt.Println("REDIS Connection INIT ------------------------")
RAddress, _ = beego.AppConfig.String("redisAddress")
RPass, _ = beego.AppConfig.String("redisPassword")
RDB, _ = beego.AppConfig.Int("redisDb")
RedisClient = redis.NewClient(&redis.Options{
Addr: RAddress,
Password: RPass,
DB: RDB,
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment