This is a simple redis clone written in golang. its a cli tool which has some basic
features of redis in memory database system. This project was built for fun and
learning new language features.
Clone the project and run the following commands
make run
-
GET
- Usage:
GET {key}
- Description: gets the corresponding value for the key and prints to the console.
- Usage:
-
SET
- Usage:
SET {key} {value}
- Description: sets the value of the given key to the given value.
- Usage:
-
DEL
- Usage:
DEL {key}
- Description: deletes the entry for the given key.
- Usage:
-
HGET
- Usage:
HGET {key} {field}
- Description: gets the value for the field of corresponding hash key.
- Usage:
-
HSET
- Usage:
HSET {key} {field} {value}
- Description: sets the value of the field of corresponding hash key.
- Usage:
-
HGETALL
- Usage:
HGETALL {key}
- Description: gets all the values of the correspoding hash key.
- Usage:
-
HDEL
- Usage:
HDEL {key}
- Description: deletes the entry for the given hash key.
- Usage:
-
LPUSH
- Usage:
LPUSH {key} {value}
- Description: pushes value on the left of the list of given key.
- Usage:
-
RPUSH
- Usage:
RPUSH {key} {value}
- Description: pushes value on the right of the list of given key.
- Usage:
-
LPOP
- Usage:
LPOP {key}
- Description: gets one value from the left of the given list and deletes the value.
- Usage:
-
RPOP
- Usage:
RPOP {key}
- Description: gets one value from the right of the given list and deletes the value.
- Usage:
-
LINDEX
- Usage:
LINDEX {key} {index}
- Description: gets the value of the given index from the corresponding list key.
- Usage:
-
LRANGE
- Usage:
LRANGE {key} {start} {end}
- Description: gets the list of values from start to end index of the corresponding list key.
- Usage:
-
LDEL
- Usage:
LDEL {key}
- Description: deletes the entry for the given list key.
- Usage:
-
EXIT
- Usage:
EXIT
- Description: exits the program.
- Usage: