在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
package main import ( "fmt" "github.com/go-redis/redis" ) func main() { client := redis.NewClient(&redis.Options{ Addr: "127.0.0.1:6380", Password: "", DB: 0, }) var reply int64 var err error reply, err = client.LPush("key", "value1", "value2", "value3").Result() fmt.Printf("reply=%d err_lpush=%v\n", reply, err) } 输出: reply=3 err_lpush=<nil>
读写队列的相关命令LPush,RPush,LRange,LPop,RPop的用法示例:https://blog.csdn.net/pengpengzhou/article/details/108361064 |
请发表评论