flashmob / go-guerrilla

Mini SMTP server written in golang
MIT License
2.77k stars 365 forks source link

Might be a tiny bug in “p_redis.go”. #196

Closed issuefiler closed 4 years ago

issuefiler commented 4 years ago

https://github.com/flashmob/go-guerrilla/blob/51f7dda326b1e9878e5f679ccb34a134127951b0/backends/p_redis.go#L100

https://github.com/flashmob/go-guerrilla/blob/51f7dda326b1e9878e5f679ccb34a134127951b0/backends/p_redis.go#L106-L111

Shouldn’t it return result, doErr?

flashmob commented 4 years ago

Here we don't really care about the result, because were using SETEX (saving data)

issuefiler commented 4 years ago

https://github.com/flashmob/go-guerrilla/blob/51f7dda326b1e9878e5f679ccb34a134127951b0/backends/p_redis.go#L100-L111

I mean, the line number 110: return result, redisErr. Does it really mean to return redisErr that is a nil?

flashmob commented 4 years ago

Indeed, line 110 should return doErr.

Todo: Fix

flashmob commented 4 years ago

fixed in #202 https://github.com/flashmob/go-guerrilla/pull/202/files#diff-a1c0f6ddb8710df8182db68e5085731dR110