파이프 라인 다중 HGETALL 명령을 관리했지만 문자열로 변환 할 수 없습니다.Redigo 파이프 라인 결과를 문자열로 변환
[[[116 105 116 108 101] [104 105]] [[116 105 116 108 101] [104 101 108 108 111]]]
그러나 :
// Initialize Redis (Redigo) client on port 6379
// and default address 127.0.0.1/localhost
client, err := redis.Dial("tcp", ":6379")
if err != nil {
panic(err)
}
defer client.Close()
// Initialize Pipeline
client.Send("MULTI")
// Send writes the command to the connection's output buffer
client.Send("HGETALL", "post:1") // Where "post:1" contains " title 'hi' "
client.Send("HGETALL", "post:2") // Where "post:1" contains " title 'hello' "
// Execute the Pipeline
pipe_prox, err := client.Do("EXEC")
if err != nil {
panic(err)
}
log.Println(pipe_prox)
그것은만큼 당신이 문자열이 아닌 결과를 보여주는 편안있는 한 괜찮은 .. 내가지고있어하는 것은 이것이다 :
내 샘플 코드는 이것이다 내가 필요한 것은 : 나뿐만 아니라 다음과 같은 다른 조합을 시도했습니다
"title" "hi" "title" "hello"
:
result, _ := redis.Strings(pipe_prox, err)
log.Println(pipe_prox)
하지만 내가 가진 전부입니다 : []
내가 여러으로 HGET키 값 명령을 작동하는 것을 유의해야하지만 그게 내가 필요하지 않습니다.
내가 뭘 잘못하고 있니? "수치지도"를 문자열로 변환하려면 어떻게해야합니까? 어떤 도움