dice icon indicating copy to clipboard operation
dice copied to clipboard

Redundant conditional in evalGET

Open hamdaankhalid opened this issue 3 years ago • 0 comments

Describe the bug Not a bug but more of something that caught my eye when reading the codebase. It's my first time looking at or attempting anything open source. Lmk if this is the wrong category to file this. I wanted to open this issue so I could make a corresponding PR and fix this.

Package: core File: eval.go Method: evalGET

Get(key) will delete any expired key already, so the conditional listed below is redundant in code.

if hasExpired(obj) {
		return RESP_NIL
}

Expected behavior Remove redundant condition since Get(key) takes care of the case.

hamdaankhalid avatar Oct 28 '22 23:10 hamdaankhalid