redis-shake工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
299 B

package structure
import (
"RedisShake/internal/log"
"io"
)
func ReadByte(rd io.Reader) byte {
b := ReadBytes(rd, 1)[0]
return b
}
func ReadBytes(rd io.Reader, n int) []byte {
buf := make([]byte, n)
_, err := io.ReadFull(rd, buf)
if err != nil {
log.Panicf(err.Error())
}
return buf
}