From dc5bb7cdd5bf815eb314de7d0afdf9b8b117ec11 Mon Sep 17 00:00:00 2001 From: Manish R Jain <manishrjain@gmail.com> Date: Tue, 3 May 2016 18:45:52 +1000 Subject: [PATCH] merge if else to if --- posting/list.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/posting/list.go b/posting/list.go index 92a56e2e..8fec9f18 100644 --- a/posting/list.go +++ b/posting/list.go @@ -738,10 +738,7 @@ func (l *List) GetUids(offset, count int) []uint64 { offset = 0 } - if count == 0 { - count = l.length() - offset - - } else if count > l.length()-offset { + if count == 0 || count > l.length()-offset { count = l.length() - offset } if count < 0 { -- GitLab