From 1098ed89d8d0dcc88730d6d71e0819cfc1eb1e3b Mon Sep 17 00:00:00 2001 From: Vandewilly Date: Mon, 15 Oct 2018 15:51:55 -0700 Subject: [PATCH] Drop 'else' condition when 'if' ends with a return (#4743) This commit drops the else condition when the if block ends with a return statement. Signed-off-by: Vandewilly Silva --- promql/value.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/promql/value.go b/promql/value.go index 2063f22d7..218f6c533 100644 --- a/promql/value.go +++ b/promql/value.go @@ -149,9 +149,8 @@ func (vec Vector) ContainsSameLabelset() bool { hash := s.Metric.Hash() if _, ok := l[hash]; ok { return true - } else { - l[hash] = struct{}{} } + l[hash] = struct{}{} } return false } @@ -193,9 +192,8 @@ func (m Matrix) ContainsSameLabelset() bool { hash := ss.Metric.Hash() if _, ok := l[hash]; ok { return true - } else { - l[hash] = struct{}{} } + l[hash] = struct{}{} } return false }