redis_adapter

command module
v0.0.0-...-6eabf4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 4 Imported by: 0

README

Redis Adapter for Go

This module helps to you some redis command which such as set, get and del

Connect to Redis
redisClient = ConnectRedis("localhost", 6379, database, "passsword")
Set New Key
response, err := redisClient.Set("bariseser", "Bariseser", time.Second*60*60)

if err != nil {
    log.Fatal(err.Error())
}
Get Key
response, err := redisClient.Get("bariseser")

if err != nil {
    log.Fatal(err.Error())
}
Delete Key
err := redisClient.Del("bariseser")

if err != nil {
    log.Fatal(err.Error())
}
Ping Redis
response, err := redisClient.Ping()
if err != nil {
    log.Fatal(err.Error())
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL