2020-11-08 23:43:18 +01:00
|
|
|
package main
|
2020-11-08 23:48:45 +01:00
|
|
|
|
2020-11-08 23:43:18 +01:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"github.com/go-redis/redis/v8"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2020-11-08 23:48:45 +01:00
|
|
|
|
2020-11-08 23:43:18 +01:00
|
|
|
fmt.Println("Hello World")
|
|
|
|
|
|
|
|
client := redis.NewClient(&redis.Options{
|
|
|
|
Addr: "redis:6379",
|
|
|
|
Password: "", // no password set
|
|
|
|
DB: 0, // use default DB
|
|
|
|
})
|
|
|
|
pong, err := client.Ping().Result()
|
|
|
|
fmt.Println(pong, err)
|
|
|
|
|
|
|
|
}
|