MCPcopy
hub / github.com/eddycjy/go-gin-example / Get

Function Get

pkg/gredis/redis.go:79–89  ·  view source on GitHub ↗

Get get a key

(key string)

Source from the content-addressed store, hash-verified

77
78// Get get a key
79func Get(key string) ([]byte, error) {
80 conn := RedisConn.Get()
81 defer conn.Close()
82
83 reply, err := redis.Bytes(conn.Do("GET", key))
84 if err != nil {
85 return nil, err
86 }
87
88 return reply, nil
89}
90
91// Delete delete a kye
92func Delete(key string) (bool, error) {

Callers 3

GetAllMethod · 0.92
GetMethod · 0.92
GetAllMethod · 0.92

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected