From f08763cf374c27f6432ee5a7dc3835d1ddd3da2b Mon Sep 17 00:00:00 2001 From: Nikolay Turpitko Date: Fri, 22 Jan 2016 16:57:52 +0500 Subject: [PATCH] Update script.go OK then. I removed my comments, for bool code should work as is. --- server/script.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/server/script.go b/server/script.go index 8e6b14f..8fd22ec 100644 --- a/server/script.go +++ b/server/script.go @@ -86,23 +86,10 @@ func (w *luaWriter) writeSliceArray(lst [][]byte) { for i, v := range lst { if v == nil { w.l.PushBoolean(false) - //TNL: not sure what is "expected" behaviour here. - //Redis returns "false", but may be "nil" is more appropriate? - //For me both variants seems better, then empty string. - // - //w.l.PushNil() } else { w.l.PushString(hack.String(v)) } w.l.RawSeti(-2, i+1) - - /* - //TNL: and instead of push nil we can just skip it - if v != nil { - w.l.PushString(hack.String(v)) - w.l.RawSeti(-2, i+1) - } - */ } }