req := &redeo.Request{ Cmd: "SET", Args: []string{"mykey", "myvalue"}, }
data := []byte("*3\r\n$3\r\nSET\r\n$5\r\nmykey\r\n$7\r\nmyvalue\r\n") req, err := redeo.ParseRequest(data) if err != nil { log.Fatal(err) }In this example, we pass in the raw bytes of a Redis request, and the library parses it into a Request object. Overall, the github.com.bsm.redeo package is useful for building Redis-compatible servers in Go, and the Request package provides a simple way to handle individual Redis command requests.