Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.02 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.02 KB

Go report card

Redis logo

golang-redis-mock

A minimal functional Redis server written in Golang. I built this to learn Golang while simultaneouly building out a functional product that begs good code practices, moderate use of concurrent goroutines and dynamic type management.

Running locally

Make sure that you have Go installed, and that it supports go modules.

go run server.go

This will open up a mock of redis-cli, and you can execute simple basic commands.

Listening on localhost:6382
redis-cli> GET k
(nil)
redis-cli> SET k 2
OK
redis-cli> GET k
2
redis-cli> GETSET foo bar
bar
redis-cli> 

Allowed commands are GET, SET, DEL, GETSET, APPEND, SETNX, STRLEN, SETEX.

Running tests

cd resp && go test