Comments (1)
把reply.go中的String函数修改一下就可以在cluster.Do函数使用"keys *"
func String(value interface{}, err error) (string, error) {
var key string
if err == nil {
return key, err
}
switch value.(type) {
case float64:
ft := value.(float64)
key = strconv.FormatFloat(ft, 'f', -1, 64)
case float32:
ft := value.(float32)
key = strconv.FormatFloat(float64(ft), 'f', -1, 64)
case int:
it := value.(int)
key = strconv.Itoa(it)
case uint:
it := value.(uint)
key = strconv.Itoa(int(it))
case int8:
it := value.(int8)
key = strconv.Itoa(int(it))
case uint8:
it := value.(uint8)
key = strconv.Itoa(int(it))
case int16:
it := value.(int16)
key = strconv.Itoa(int(it))
case uint16:
it := value.(uint16)
key = strconv.Itoa(int(it))
case int32:
it := value.(int32)
key = strconv.Itoa(int(it))
case uint32:
it := value.(uint32)
key = strconv.Itoa(int(it))
case int64:
it := value.(int64)
key = strconv.FormatInt(it, 10)
case uint64:
it := value.(uint64)
key = strconv.FormatUint(it, 10)
case string:
key = value.(string)
case []byte:
key = string(value.([]byte))
default:
newValue, _ := json.Marshal(value)
key = string(newValue)
}
return key, err
}
from redis-go-cluster.
Related Issues (20)
- when to support connection redis cluster by user and password
- consider add `ActiveCount() int` method?
- when to support connection redis cluster by user and password? HOT 2
- Add options to support multiple redis instances behind the same hostname
- Documentation: PUBLISH is actually supported, right?
- When the value has the “/r/n” inside, the readLine Method in node.go work incorrect HOT 1
- can this pkg allow `redis set option`
- Lua script support HOT 1
- How to add support for `IdleTimeout`, `readOnly` property for the client?
- Mget() works on slot level not on node level ?
- I can't connect Redis cluster HOT 3
- sdiff 不能获取多个set 的元素差集
- how use it when my redis cluster has authentication HOT 1
- client can connect to Redis cluster, but can not Do(), and node.address is 172.16.7.16:8002@18002
- ERR: Do: invalid response
- can you add a new tag update to master
- when i init cluster nodes client ,i can't find input cluster password place
- How to Change Db HOT 1
- Does it support redis module command?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-go-cluster.